# Robot Indoor Positioning and Navigation Based on Improved WiFi Location Fingerprint Positioning Algorithm

Authors: Hemin Ye; Jiansheng Peng
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In response to the traditional WiFi location fingerprint positioning algorithm still having a low positioning accuracy, which is difficult to meet the robot indoor positioning and navigation needs, a series of improvements are made to the traditional WiFi location fingerprint positioning algorithm, so that the positioning accuracy of the algorithm can be effectively improved. At the stage of building the location fingerprint library offline, WiFi signals are collected at each reference point by reducing the reference point spacing of the traditional location fingerprinting algorithm and then using different time period collection methods. The WiFi signal strength values are standardized using the standardization processing method to improve the specificity of traditional location fingerprinting. In the real-time localization stage, the WiFi signals collected from the unknown location points are averaged, and then, the fingerprint similarity calculation is performed using a matching method based on the magnitude of the Marxian distance as a similarity reference. In order to eliminate the location fingerprints that degrade the localization accuracy, an improved adaptiveK-value WKNN algorithm is integrated at the end of the localization algorithm. The improved localization algorithm and the proposed raster-based navigation algorithm are validated in a fixed experimental environment. The experimental results show that the probability of the improved algorithm’s positioning error within 0.4 m is 49%, which is a 35% improvement over the conventional algorithm. Combining the improved positioning algorithm with our proposed grid-based navigation algorithm, the final navigation error probability within 0.8 m is 62%.


---

## Body

## 1. Introduction

In recent years, due to the development of sensors, chips, and artificial intelligence, robots have become more and more intelligent and flexible [1]. Therefore, robots are used in more and more fields. Hata et al. developed a robot system with flexible manipulators, stereo cameras, and 3D vision for cloth handling [2]. A company based in Pittsburgh, Philadelphia, Aethon, has developed a medical mobile robot that can help patients in the ward transport needed food and cleaning supplies, and it can also accurately and timely provide prescription drugs and medical supplies to nursing stations [3]. Now, many robots are also used in hotels. These robots can clean, move items, provide information, accept customer orders, process payments, etc. [4]. Literature [5] proposes multisource information fusion, which combines ultrawideband positioning technology, an odometer, low-cost gyroscope, and accelerometer to develop a trackless food delivery robot with navigation function. The application scenarios of the factory handling robots, hospital medical robots, hotel service robots, and restaurant delivery robots introduced above are shown in Figure 1. For these robots to successfully complete these specific tasks, the robot’s positioning and navigation functions are indispensable. The robot with the positioning and navigation function can perceive its current position and can navigate to the specified position in the above application scenarios.Figure 1
Robots in various application scenarios.The popular GPS (global positioning system) [6] can obtain high positioning accuracy outdoors. The civilian use can reach a positioning accuracy of 3 meters, and the military use can even achieve a positioning accuracy of 0.3 meters. GPS is widely used in the positioning and navigation of moving objects such as automobiles, ships, airplanes, and handheld mobile terminals. However, most of the robots in the above application scenarios are in complex indoor environments, and it is almost impossible to apply GPS to indoor positioning. The biggest problem is that the GPS signal will be greatly weakened when it encounters buildings and various indoor objects, so the positioning error will increase sharply when GPS is used for indoor positioning [7]. Therefore, it is necessary to find a positioning technology that is suitable for indoor positioning and has high positioning accuracy and low cost. It is of important research significance to apply this positioning technology to the robot’s indoor positioning so as to realize the robot’s indoor positioning and navigation.With the development of wireless local area networks, WiFi devices have become network devices that can be seen everywhere indoors. Using indoor WiFi signals to locate robots has the advantages of low cost, high accuracy, large positioning coverage, high indoor penetration, and high communication capabilities. However, the current traditional WiFi location fingerprint positioning algorithm is generally not high in positioning accuracy, and it is difficult to meet the requirements of robots for indoor positioning accuracy. For this reason, this article makes corresponding improvements on the basis of the traditional WiFi location fingerprint positioning algorithm, so that the positioning accuracy of the improved positioning algorithm can meet the requirements of the robot for indoor positioning accuracy. In order to enable the robot to navigate to the designated position smoothly, the author proposes a grid-based navigation algorithm based on the characteristics of the improved positioning algorithm. Compared with most navigation algorithms, this navigation algorithm has the advantages of simple implementation, less calculation, and higher accuracy.The rest of the paper is organized as follows. The second part is a literature review of the robot’s indoor positioning and navigation. The third part introduces the system design, including the design of the robot, the design of the positioning model, and the design of the navigation model. The fourth part discusses the improved WiFi location fingerprint positioning algorithm and the grid navigation algorithm based on the positioning algorithm. The fifth part presents our experimental design and results. The sixth part is the conclusion of the full text.


## 2. Related Work

Robot indoor positioning technology first appeared in the middle and late 20th century. At that time, researchers from Japan proposed a reliable, safe, and cheap positioning system for indoor mobile robots [8]. It uses an active ultrasonic beacon installed on the ceiling to send an ID code to the robot via a wireless link to control the transmission of ultrasonic pulses. The two receivers on the robot measure the flight time of ultrasonic pulses from two beacons at known positions. After getting the flight time, the two-dimensional position and direction of the robot can be determined. The developed system enables the robot to obtain good positioning accuracy in a small area. However, the ultrasonic waves used in the system are easily affected by indoor complex factors, which may lead to increased positioning errors, and the ultrasonic transmission distance is short. Therefore, it can only work within a certain range. This limits the development of ultrasonic positioning technology.In order to solve this problem, researchers try to use lidar to obtain information about the indoor environment, thereby realizing the positioning of the robot. In the literature [9], a robot uses the raw data provided by two laser rangefinders to estimate the distance and angle to another robot, thereby realizing multirobot positioning. However, using lidar alone for robot positioning, the positioning accuracy is not particularly ideal. In order to further improve the positioning accuracy of the robot, people try to integrate the lidar with other sensors for positioning.Researchers from the Beijing Institute of Technology proposed a positioning and navigation system based on the fusion of lidar and camera [10]. They proposed a three-dimensional (3D) semantic map with large-scale and accurate integration of lidar and camera information to realize real-time road scenes. Moreover, a convolutional neural network- (CNN-) based semantic segmentation of images is employed to develop the semantic map of the environment. On the basis of time and space synchronization, the sensor fusion of lidar and camera is used to generate semantic mark frames of the point cloud and then generate a semantic map based on attitude. Literature [11] presents a mobile robot simultaneous localization and mapping method that combines lidar and inertial measurement unit to set up a multisensor integrated system and uses a rank Kalman filtering to estimate the robot motion trajectory through inertial measurement unit and lidar observations. Literature [12] utilizes data gathered with an autonomous delivery robot to compare different sensor fusion techniques and evaluate which algorithms provide the highest accuracy depending on the environment. They show how lidar scan matching combined with other sensor data can be used to increase the accuracy of the robot localization and, in consequence, its navigation. Although the fusion positioning by lidar and other sensors can obtain a higher positioning accuracy, due to the high price of lidar, it is difficult for this positioning technology to be popularized and developed.In recent years, with the development of artificial intelligence and machine vision, more and more researchers choose to use visual SLAM- (simultaneous localization and mapping-) based [13] robot indoor positioning and navigation technology. For example, in literature [14], robots are applied to hospitals, and a SLAM technology based on RGB and depth images is proposed to improve hospital operation efficiency. Since most of the current visual SLAM researches assume that the environment is static, it will be a challenge when dealing with real and dynamic scenes. Based on this problem, literature [14] also proposed a method that effectively deals with SLAM problems for scenarios with dynamic objects, e.g., people and movable objects, based on the semantic descriptor extracted from images with help of a knowledge graph. Literature [15] studied real-time robot detection and map construction. The autonomous robot uses a single stereo vision camera to navigate, self-position, define the environment, and avoid any possible obstacles to follow the best route to the greatest extent to draw the map area. Recently, the research of visual SLAM positioning and navigation in the field of robotics remains high due to its own advantages. However, its shortcomings are also more prominent, such as the following: visual SLAM is more sensitive to light, and it is easy to fail to match when the light is not good; the image processing of visual SLAM is complicated; the amount of calculation is large; and the processing speed is slow. For this reason, this article combines the improved WiFi location fingerprint positioning algorithm and the proposed grid-based navigation algorithm for positioning navigation, which may be a new mode to solve the above difficulties, because the improved positioning algorithm in this paper has achieved good results in positioning accuracy. In addition, the proposed grid navigation algorithm is simple to implement, small in calculation, fast in processing speed, and not affected by the above-mentioned factors.


## 3. System Design

The designed positioning algorithm is running on the OpenWrt [16] system on board the Raspberry Pi [17]. However, it is the STM32 [18] that controls the robot’s motion. Therefore, the Raspberry Pi transmits the current positioning result and destination point information to the STM32 by means of serial communication, as shown in Figure 2. When the STM32 gets the data from the serial port, it will start the raster navigation algorithm for navigation. During the navigation process, the robot’s walking speed needs to be controlled and maintained at a constant speed value in order to reach the actual destination more accurately. Therefore, the pulses generated by the motor rotation are detected using an encoder. Then, a PWM [19] control is finally applied to the motor through the calculation of a PID algorithm [20]. This is the closed-loop control of the PID algorithm. The navigation process due to the positioning error at the starting point may cause the robot to walk away from the intended route and thus encounter obstacles, which requires the obstacle avoidance algorithm for obstacle avoidance. The obstacle avoidance algorithm designed in this paper uses an infrared obstacle avoidance module for obstacle detection.Figure 2
System model diagram.


## 4. Methodology

Figure3 shows the model diagram of the improved WiFi location fingerprinting algorithm. The algorithm is divided into an offline phase to build the location fingerprint database and a real-time localization phase. In the phase of building the location fingerprint database offline, the indoor is first divided into equally spaced raster points (see 4.1.1), and the spacing of each raster point is smaller than the raster point spacing of the traditional algorithm. The robot performs WiFi signal acquisition at each grid point (reference point) in the room, and unlike the traditional algorithm, the improved algorithm uses WiFi signal acquisition methods for different time periods (see 4.1.2). The traditional algorithm is prone to matching errors due to the low specificity of the location fingerprint. Therefore, the collected data are normalized [21] (see 4.1.4) to improve the location fingerprint specificity and thus the matching accuracy. In the real-time localization phase, the robot acquires a real-time WiFi signal at an unknown point in the room. The collected WiFi signals are then averaged. The formula of the Mahalanobis distance [22] is used in the matching algorithm to calculate the Mahalanobis distance between the data collected from this unknown point and each location fingerprint in the location fingerprint database. The size of the Mahalanobis distance is used as a reference for the similarity, and the smaller the Mahalanobis distance, the greater the similarity. Finally the improved adaptive K-value WKNN [23] algorithm (see 4.2.3) is fused to remove the noisy points, thus improving the accuracy of location estimation. When the estimated coordinates of the unknown point are obtained, they are sent to the mobile or PC terminal. The user can view the robot’s position in the room on the control platform, indicated by a red dot.Figure 3
Improved WiFi location fingerprint positioning algorithm model diagram.


### 4.1. Offline Establishment of Location Fingerprint Database Stage

#### 4.1.1. Divide Equidistant Grid

Traditional location fingerprinting algorithms usually perform equidistant raster division of the indoor environment before collecting WiFi signal data offline, but the reference point interval divided is usually 1 meter and above. Experimentally, we found that the localization accuracy of the same algorithm is improved as the reference point spacing gradually decreases. Considering the algorithm localization accuracy and data collection workload, we decided to use a 0.3 m equidistant raster in the improved WiFi location fingerprinting algorithm. Figure4 shows the top view of the room with a reference point spacing of 0.3 m. All subsequent experiments will be conducted in this environment.Figure 4
Distribution map of reference points with a 0.3-meter spacing.


#### 4.1.2. WiFi Signal Collection Method

WiFi signals are affected by indoor obstructions, signal multipath propagation, environmental factors, and other conditions. Therefore, WiFi signal strength values fluctuate from time to time, and the degree of fluctuation varies at each time of the day. The traditional location fingerprinting algorithm collects WiFi signals at one time of the day and does not take into account the fluctuation of WiFi signal strength values at different times of the day, which will have a significant impact on the positioning accuracy if these data are used to build the fingerprint database. To address this problem, the improved algorithm collects 100 WiFi signals at each reference point in the indoor environment to build a location fingerprint database. However, these 100 collections were made at different times of the day, and the number of collections for each time period is shown in Table1. Such a collection method will effectively solve the problem of large fluctuations of WiFi signals on the localization accuracy compared with the collections method of traditional algorithms.Table 1
The number of collections corresponding to each period.
Time periodCollection times8:00-11:30 in the morning3012:00-1:30 noon102:30-5:30 in the afternoon307:30-10:30 in the evening30


#### 4.1.3. Determination of the Number of WiFi Devices

In order to find out the number of WiFi devices with the best localization accuracy performance in the experimental environment of this paper, six groups of experiments were done in the indoor environment of Figure4. First, one WiFi device is selected to build the fingerprint database and real-time localization, and then, the number of WiFi devices is gradually increased. The WiFi devices are added in the order of WiFi device numbers. Figure 5 shows the average localization error of the improved localization algorithm with different numbers of WiFi devices. It can be seen from the figure that the average positioning error of the algorithm does not decrease significantly when the number of WiFi devices is increased from 4 to 5 or even 6. Based on this conclusion, 4 WiFi devices are used in the subsequent experiments to ensure a high positioning accuracy with a minimum number of WiFi devices.Figure 5
A schematic diagram of the influence of different AP numbers on the positioning accuracy of the algorithm in the experimental environment of this article.


#### 4.1.4. Standardized Processing of WiFi Signals

The location fingerprint data constructed in the offline phase of the traditional location fingerprint positioning algorithm is expressed asxt,yt, rssi1, rssi2, rssi3, and rssi4, which contains the coordinates of the reference point t and the average value of the collected 4 WiFi signal strengths. However, the specificity of the location fingerprint constructed by the traditional location fingerprinting algorithm is not high, so it is easy to generate matching errors during localization, which reduces the algorithm localization accuracy. In order to improve the specificity of the location fingerprint and thus the accuracy of the algorithm, a standardized processing method is used to standardize the collected WiFi signals and thus build a standardized location fingerprint database. xt,yt,mt,∑t is the location fingerprint of the reference point t after the normalization process, and t represents the current reference point (t=1,2,⋯,N). For such fingerprint data, there are N in the location fingerprint database (N represents the total number of reference points). Among them, xt,yt represents the coordinates of the reference point t room. mt is the expected vector of 4 WiFi signal strengths collected at the reference point t. mt can be estimated from the following:
(1)mt=1n∑k=1nX1,kt,1n∑k=1nX2,kt,1n∑k=1nX3,kt,1n∑k=1nX4,kt.The first item in the vector represents the average value of the signal strength of the access point AP1 collected at the reference point t, X represents the signal strength value, k represents the kth acquisition, and n is the total number of acquisitions. The second, third, and fourth items, respectively, represent the average signal strength of AP2, AP3, and AP4. ∑t is a covariance matrix, which can be expressed as
(2)∑t=covXit,Xjti,j=1,4¯=σt,12λ1,2tλ2,1tσt,22λ1,3tλ1,4tλ2,3tλ2,4tλ3,1tλ3,2tλ4,1tλ4,2tσt,32λ3,4tλ4,3tσt,42.Among them,λi,jt≡covXit,Xjt=EXit,Xjt−EXit×EXjt, i,j=1,4¯i≠j; λi,it≡σt,i2=VarXit=EXit2−EXit2, i=1,4¯.The estimated value of∑t at the reference point t is λi,jt=covXit,Xjt, i,j=1,4¯, and the estimated value of λi,jt can be expressed as follows:
(3)αijt=1n∑k=1nXi,kt×Xj,kt−1n∑k=1nXi,kt×1n∑k=1nXj,kt.∑t is estimated as ∑t=αijti,j=1,4¯. The covariance matrix ∑t is a symmetric matrix αijt=αjiti,j=1,4¯. So just calculate the upper or lower triangle of the covariance matrix.During real-time positioning, the robot collects real-time WiFi signal strength values at unknown coordinate points. Then, the coordinates of the unknown location are obtained by calculating the currently collected signal strength value andmt and ∑t in all fingerprint data in the location fingerprint database. The specific process will be introduced in the real-time positioning phase.


### 4.2. Real-Time Positioning Stage

#### 4.2.1. Signal Collection and Processing

In the real-time positioning stage, the robot first collects WiFi signals 5 times at unknown locations and then performs average processing according to formula (4), where rssiAPn represents the average WiFi signal strength of the nth (n=1,2,⋯,4) AP; rssiAPnk represents the WiFi signal strength value of the nth AP collected at the kth (k=1,2,⋯,5) time. After such processing, the signal strength vector x=rssiAP1,rssiAP2,rssiAP3,rssiAP4 of the unknown position can be obtained.
(4)rssiAPn=rssiAPn1+rssiAPn2+⋯+rssiAPnkk.


#### 4.2.2. Matching Method

After obtaining the signal strength vectorx=rssiAP1,rssiAP2,rssiAP3,rssiAP4 of the unknown location point, the Mahalanobis distance is used as the standard to measure the similarity between x and the location fingerprint data in the matching method. The smaller the Mahalanobis distance, the greater the similarity between the corresponding location fingerprint and x. On the contrary, the larger the Mahalanobis distance, the smaller the similarity between the corresponding location fingerprint and x. The Mahalanobis distance formula can be expressed as follows:
(5)d=x−mt×∑t−1×x−mtT,where x is the real-time WiFi signal strength vector collected by the robot at an unknown location, mt is the expected WiFi signal strength vector of the location fingerprint of the reference point t, and ∑t is the covariance matrix of the location fingerprint of the reference point t.


#### 4.2.3. Improved AdaptiveK-Value WKNN Algorithm

The position fingerprint of the minimum Marxian distance can be calculated by Equation (5). However, using the coordinates corresponding to the minimum Marxian distance location fingerprint as the estimated coordinates of the unknown location point will make the error fluctuation of the algorithm localization larger, thus increasing the localization error. To solve this problem, an improved adaptive K-value WKNN algorithm is fused in the final stage of the algorithm. First, we use Equation (5) to calculate the Mahalanobis distance d between x and all location fingerprints. Then all Mahalanobis distances d are sorted in ascending order. After sorting, the smallest Mahalanobis distance is d1, the largest Mahalanobis distance is dN, N is the number of location fingerprints, and d1N is the difference in Mahalanobis distance between d1 and dN. We calculate the average value of Mahalanobis distance difference from the following equation:
(6)d¯=d12+d13+⋯+d1N−1+d1NN−1.The standard deviationS of the Mahalanobis distance difference is calculated by the following:
(7)S=∑t=2Nd1t−d¯2N−1.Ifd1t>S, then the corresponding location fingerprint will be excluded. Otherwise, keep it, and the number of location fingerprints at the remaining is K.In order to further eliminate outlier location fingerprints and retain location fingerprints that are effective for improving positioning accuracy, theseK location fingerprints are eliminated for the second time. First, we calculate the Euclidean distance between the coordinates x1,y1 corresponding to the fingerprint of the smallest Mahalanobis distance and the fingerprint coordinates of the other K−1 locations. They are marked as dist12, dist13,…, dist1k, where dist1k can be expressed as
(8)dist1k=x1−xk2+y1−yk2.Whendist1k>dmin, the location fingerprint will be removed from the K location fingerprints. The value of dmin can be adjusted according to different environments. After testing, better results can be obtained in the experimental environment of this article when dmin=1.Finally, the coordinates corresponding to the remainingk (k<K) position fingerprints are weighted:
(9)x,y=∑t=1k1/dt+ε∑t=1k1/dt+εxt,yt,where x,y is the final positioning result obtained by the robot, xt,yt is the coordinate of the reference point t, dt is the Mahalanobis distance corresponding to the fingerprint at the reference point t, and ε is a small positive integer, and its function is to prevent the denominator from being zero.


### 4.3. Navigation Method

In the stage of constructing the location fingerprint database of the positioning algorithm, the indoor environment is divided into equidistant grids. The vertices of each grid are used as reference points when building the location fingerprint database, and each reference point has a unique coordinate. The vertex at the upper left corner of the indoor plan is used as the origin of the coordinate axis. The right direction of the origin is the positive direction of thex-axis, and the bottom of the origin is the positive direction of the y-axis. In this design, the reference point spacing is set to 0.3 meters.In the navigation process, a grid navigation algorithm is used. First, the program has been waiting for the user’s navigation request. When the user passes through the navigation page of the robot control platform as shown in Figure6, the navigation destination is entered into the web page. After the user clicks to start navigation, the Raspberry Pi OpenWrt system can receive the user’s navigation request at this time. Then, the robot starts the positioning program to obtain the coordinates of the current position, and the coordinates of the destination point and the coordinates of the current position are made different. The displacement duration of the robot in the x direction and y direction is calculated according to the difference result and the walking speed of the robot, as shown in Equations (10) and (11).
(10)Tx=Xe−Xsv,(11)Ty=Ye−Ysv,where Xe is the abscissa of the destination point, Xs is the abscissa of the current location point, v is the robot walking speed, Tx is the displacement control time in the x direction, Ye is the ordinate of the destination point, Ys is the ordinate of the current location point, and Ty is the displacement in the y direction control time. Then, according to the displacement time in each direction, the robot is controlled to move from the starting point to the target point. During the movement, the robot always turns on the function of detecting obstacles. When obstacles are encountered during navigation, the obstacle avoidance algorithm is activated. After solving the obstacle problem, the positioning program will be restarted to obtain the current position coordinates, and then, the process just now continues to loop. If there are no obstacles during navigation, the robot can reach the end point smoothly and end the program. Figure 7 is a program flow chart of the grid navigation method.Figure 6
Navigation page.Figure 7
Grid navigation method program flow chart.


## 4.1. Offline Establishment of Location Fingerprint Database Stage

### 4.1.1. Divide Equidistant Grid

Traditional location fingerprinting algorithms usually perform equidistant raster division of the indoor environment before collecting WiFi signal data offline, but the reference point interval divided is usually 1 meter and above. Experimentally, we found that the localization accuracy of the same algorithm is improved as the reference point spacing gradually decreases. Considering the algorithm localization accuracy and data collection workload, we decided to use a 0.3 m equidistant raster in the improved WiFi location fingerprinting algorithm. Figure4 shows the top view of the room with a reference point spacing of 0.3 m. All subsequent experiments will be conducted in this environment.Figure 4
Distribution map of reference points with a 0.3-meter spacing.


### 4.1.2. WiFi Signal Collection Method

WiFi signals are affected by indoor obstructions, signal multipath propagation, environmental factors, and other conditions. Therefore, WiFi signal strength values fluctuate from time to time, and the degree of fluctuation varies at each time of the day. The traditional location fingerprinting algorithm collects WiFi signals at one time of the day and does not take into account the fluctuation of WiFi signal strength values at different times of the day, which will have a significant impact on the positioning accuracy if these data are used to build the fingerprint database. To address this problem, the improved algorithm collects 100 WiFi signals at each reference point in the indoor environment to build a location fingerprint database. However, these 100 collections were made at different times of the day, and the number of collections for each time period is shown in Table1. Such a collection method will effectively solve the problem of large fluctuations of WiFi signals on the localization accuracy compared with the collections method of traditional algorithms.Table 1
The number of collections corresponding to each period.
Time periodCollection times8:00-11:30 in the morning3012:00-1:30 noon102:30-5:30 in the afternoon307:30-10:30 in the evening30


### 4.1.3. Determination of the Number of WiFi Devices

In order to find out the number of WiFi devices with the best localization accuracy performance in the experimental environment of this paper, six groups of experiments were done in the indoor environment of Figure4. First, one WiFi device is selected to build the fingerprint database and real-time localization, and then, the number of WiFi devices is gradually increased. The WiFi devices are added in the order of WiFi device numbers. Figure 5 shows the average localization error of the improved localization algorithm with different numbers of WiFi devices. It can be seen from the figure that the average positioning error of the algorithm does not decrease significantly when the number of WiFi devices is increased from 4 to 5 or even 6. Based on this conclusion, 4 WiFi devices are used in the subsequent experiments to ensure a high positioning accuracy with a minimum number of WiFi devices.Figure 5
A schematic diagram of the influence of different AP numbers on the positioning accuracy of the algorithm in the experimental environment of this article.


### 4.1.4. Standardized Processing of WiFi Signals

The location fingerprint data constructed in the offline phase of the traditional location fingerprint positioning algorithm is expressed asxt,yt, rssi1, rssi2, rssi3, and rssi4, which contains the coordinates of the reference point t and the average value of the collected 4 WiFi signal strengths. However, the specificity of the location fingerprint constructed by the traditional location fingerprinting algorithm is not high, so it is easy to generate matching errors during localization, which reduces the algorithm localization accuracy. In order to improve the specificity of the location fingerprint and thus the accuracy of the algorithm, a standardized processing method is used to standardize the collected WiFi signals and thus build a standardized location fingerprint database. xt,yt,mt,∑t is the location fingerprint of the reference point t after the normalization process, and t represents the current reference point (t=1,2,⋯,N). For such fingerprint data, there are N in the location fingerprint database (N represents the total number of reference points). Among them, xt,yt represents the coordinates of the reference point t room. mt is the expected vector of 4 WiFi signal strengths collected at the reference point t. mt can be estimated from the following:
(1)mt=1n∑k=1nX1,kt,1n∑k=1nX2,kt,1n∑k=1nX3,kt,1n∑k=1nX4,kt.The first item in the vector represents the average value of the signal strength of the access point AP1 collected at the reference point t, X represents the signal strength value, k represents the kth acquisition, and n is the total number of acquisitions. The second, third, and fourth items, respectively, represent the average signal strength of AP2, AP3, and AP4. ∑t is a covariance matrix, which can be expressed as
(2)∑t=covXit,Xjti,j=1,4¯=σt,12λ1,2tλ2,1tσt,22λ1,3tλ1,4tλ2,3tλ2,4tλ3,1tλ3,2tλ4,1tλ4,2tσt,32λ3,4tλ4,3tσt,42.Among them,λi,jt≡covXit,Xjt=EXit,Xjt−EXit×EXjt, i,j=1,4¯i≠j; λi,it≡σt,i2=VarXit=EXit2−EXit2, i=1,4¯.The estimated value of∑t at the reference point t is λi,jt=covXit,Xjt, i,j=1,4¯, and the estimated value of λi,jt can be expressed as follows:
(3)αijt=1n∑k=1nXi,kt×Xj,kt−1n∑k=1nXi,kt×1n∑k=1nXj,kt.∑t is estimated as ∑t=αijti,j=1,4¯. The covariance matrix ∑t is a symmetric matrix αijt=αjiti,j=1,4¯. So just calculate the upper or lower triangle of the covariance matrix.During real-time positioning, the robot collects real-time WiFi signal strength values at unknown coordinate points. Then, the coordinates of the unknown location are obtained by calculating the currently collected signal strength value andmt and ∑t in all fingerprint data in the location fingerprint database. The specific process will be introduced in the real-time positioning phase.


## 4.1.1. Divide Equidistant Grid

Traditional location fingerprinting algorithms usually perform equidistant raster division of the indoor environment before collecting WiFi signal data offline, but the reference point interval divided is usually 1 meter and above. Experimentally, we found that the localization accuracy of the same algorithm is improved as the reference point spacing gradually decreases. Considering the algorithm localization accuracy and data collection workload, we decided to use a 0.3 m equidistant raster in the improved WiFi location fingerprinting algorithm. Figure4 shows the top view of the room with a reference point spacing of 0.3 m. All subsequent experiments will be conducted in this environment.Figure 4
Distribution map of reference points with a 0.3-meter spacing.


## 4.1.2. WiFi Signal Collection Method

WiFi signals are affected by indoor obstructions, signal multipath propagation, environmental factors, and other conditions. Therefore, WiFi signal strength values fluctuate from time to time, and the degree of fluctuation varies at each time of the day. The traditional location fingerprinting algorithm collects WiFi signals at one time of the day and does not take into account the fluctuation of WiFi signal strength values at different times of the day, which will have a significant impact on the positioning accuracy if these data are used to build the fingerprint database. To address this problem, the improved algorithm collects 100 WiFi signals at each reference point in the indoor environment to build a location fingerprint database. However, these 100 collections were made at different times of the day, and the number of collections for each time period is shown in Table1. Such a collection method will effectively solve the problem of large fluctuations of WiFi signals on the localization accuracy compared with the collections method of traditional algorithms.Table 1
The number of collections corresponding to each period.
Time periodCollection times8:00-11:30 in the morning3012:00-1:30 noon102:30-5:30 in the afternoon307:30-10:30 in the evening30


## 4.1.3. Determination of the Number of WiFi Devices

In order to find out the number of WiFi devices with the best localization accuracy performance in the experimental environment of this paper, six groups of experiments were done in the indoor environment of Figure4. First, one WiFi device is selected to build the fingerprint database and real-time localization, and then, the number of WiFi devices is gradually increased. The WiFi devices are added in the order of WiFi device numbers. Figure 5 shows the average localization error of the improved localization algorithm with different numbers of WiFi devices. It can be seen from the figure that the average positioning error of the algorithm does not decrease significantly when the number of WiFi devices is increased from 4 to 5 or even 6. Based on this conclusion, 4 WiFi devices are used in the subsequent experiments to ensure a high positioning accuracy with a minimum number of WiFi devices.Figure 5
A schematic diagram of the influence of different AP numbers on the positioning accuracy of the algorithm in the experimental environment of this article.


## 4.1.4. Standardized Processing of WiFi Signals

The location fingerprint data constructed in the offline phase of the traditional location fingerprint positioning algorithm is expressed asxt,yt, rssi1, rssi2, rssi3, and rssi4, which contains the coordinates of the reference point t and the average value of the collected 4 WiFi signal strengths. However, the specificity of the location fingerprint constructed by the traditional location fingerprinting algorithm is not high, so it is easy to generate matching errors during localization, which reduces the algorithm localization accuracy. In order to improve the specificity of the location fingerprint and thus the accuracy of the algorithm, a standardized processing method is used to standardize the collected WiFi signals and thus build a standardized location fingerprint database. xt,yt,mt,∑t is the location fingerprint of the reference point t after the normalization process, and t represents the current reference point (t=1,2,⋯,N). For such fingerprint data, there are N in the location fingerprint database (N represents the total number of reference points). Among them, xt,yt represents the coordinates of the reference point t room. mt is the expected vector of 4 WiFi signal strengths collected at the reference point t. mt can be estimated from the following:
(1)mt=1n∑k=1nX1,kt,1n∑k=1nX2,kt,1n∑k=1nX3,kt,1n∑k=1nX4,kt.The first item in the vector represents the average value of the signal strength of the access point AP1 collected at the reference point t, X represents the signal strength value, k represents the kth acquisition, and n is the total number of acquisitions. The second, third, and fourth items, respectively, represent the average signal strength of AP2, AP3, and AP4. ∑t is a covariance matrix, which can be expressed as
(2)∑t=covXit,Xjti,j=1,4¯=σt,12λ1,2tλ2,1tσt,22λ1,3tλ1,4tλ2,3tλ2,4tλ3,1tλ3,2tλ4,1tλ4,2tσt,32λ3,4tλ4,3tσt,42.Among them,λi,jt≡covXit,Xjt=EXit,Xjt−EXit×EXjt, i,j=1,4¯i≠j; λi,it≡σt,i2=VarXit=EXit2−EXit2, i=1,4¯.The estimated value of∑t at the reference point t is λi,jt=covXit,Xjt, i,j=1,4¯, and the estimated value of λi,jt can be expressed as follows:
(3)αijt=1n∑k=1nXi,kt×Xj,kt−1n∑k=1nXi,kt×1n∑k=1nXj,kt.∑t is estimated as ∑t=αijti,j=1,4¯. The covariance matrix ∑t is a symmetric matrix αijt=αjiti,j=1,4¯. So just calculate the upper or lower triangle of the covariance matrix.During real-time positioning, the robot collects real-time WiFi signal strength values at unknown coordinate points. Then, the coordinates of the unknown location are obtained by calculating the currently collected signal strength value andmt and ∑t in all fingerprint data in the location fingerprint database. The specific process will be introduced in the real-time positioning phase.


## 4.2. Real-Time Positioning Stage

### 4.2.1. Signal Collection and Processing

In the real-time positioning stage, the robot first collects WiFi signals 5 times at unknown locations and then performs average processing according to formula (4), where rssiAPn represents the average WiFi signal strength of the nth (n=1,2,⋯,4) AP; rssiAPnk represents the WiFi signal strength value of the nth AP collected at the kth (k=1,2,⋯,5) time. After such processing, the signal strength vector x=rssiAP1,rssiAP2,rssiAP3,rssiAP4 of the unknown position can be obtained.
(4)rssiAPn=rssiAPn1+rssiAPn2+⋯+rssiAPnkk.


### 4.2.2. Matching Method

After obtaining the signal strength vectorx=rssiAP1,rssiAP2,rssiAP3,rssiAP4 of the unknown location point, the Mahalanobis distance is used as the standard to measure the similarity between x and the location fingerprint data in the matching method. The smaller the Mahalanobis distance, the greater the similarity between the corresponding location fingerprint and x. On the contrary, the larger the Mahalanobis distance, the smaller the similarity between the corresponding location fingerprint and x. The Mahalanobis distance formula can be expressed as follows:
(5)d=x−mt×∑t−1×x−mtT,where x is the real-time WiFi signal strength vector collected by the robot at an unknown location, mt is the expected WiFi signal strength vector of the location fingerprint of the reference point t, and ∑t is the covariance matrix of the location fingerprint of the reference point t.


### 4.2.3. Improved AdaptiveK-Value WKNN Algorithm

The position fingerprint of the minimum Marxian distance can be calculated by Equation (5). However, using the coordinates corresponding to the minimum Marxian distance location fingerprint as the estimated coordinates of the unknown location point will make the error fluctuation of the algorithm localization larger, thus increasing the localization error. To solve this problem, an improved adaptive K-value WKNN algorithm is fused in the final stage of the algorithm. First, we use Equation (5) to calculate the Mahalanobis distance d between x and all location fingerprints. Then all Mahalanobis distances d are sorted in ascending order. After sorting, the smallest Mahalanobis distance is d1, the largest Mahalanobis distance is dN, N is the number of location fingerprints, and d1N is the difference in Mahalanobis distance between d1 and dN. We calculate the average value of Mahalanobis distance difference from the following equation:
(6)d¯=d12+d13+⋯+d1N−1+d1NN−1.The standard deviationS of the Mahalanobis distance difference is calculated by the following:
(7)S=∑t=2Nd1t−d¯2N−1.Ifd1t>S, then the corresponding location fingerprint will be excluded. Otherwise, keep it, and the number of location fingerprints at the remaining is K.In order to further eliminate outlier location fingerprints and retain location fingerprints that are effective for improving positioning accuracy, theseK location fingerprints are eliminated for the second time. First, we calculate the Euclidean distance between the coordinates x1,y1 corresponding to the fingerprint of the smallest Mahalanobis distance and the fingerprint coordinates of the other K−1 locations. They are marked as dist12, dist13,…, dist1k, where dist1k can be expressed as
(8)dist1k=x1−xk2+y1−yk2.Whendist1k>dmin, the location fingerprint will be removed from the K location fingerprints. The value of dmin can be adjusted according to different environments. After testing, better results can be obtained in the experimental environment of this article when dmin=1.Finally, the coordinates corresponding to the remainingk (k<K) position fingerprints are weighted:
(9)x,y=∑t=1k1/dt+ε∑t=1k1/dt+εxt,yt,where x,y is the final positioning result obtained by the robot, xt,yt is the coordinate of the reference point t, dt is the Mahalanobis distance corresponding to the fingerprint at the reference point t, and ε is a small positive integer, and its function is to prevent the denominator from being zero.


## 4.2.1. Signal Collection and Processing

In the real-time positioning stage, the robot first collects WiFi signals 5 times at unknown locations and then performs average processing according to formula (4), where rssiAPn represents the average WiFi signal strength of the nth (n=1,2,⋯,4) AP; rssiAPnk represents the WiFi signal strength value of the nth AP collected at the kth (k=1,2,⋯,5) time. After such processing, the signal strength vector x=rssiAP1,rssiAP2,rssiAP3,rssiAP4 of the unknown position can be obtained.
(4)rssiAPn=rssiAPn1+rssiAPn2+⋯+rssiAPnkk.


## 4.2.2. Matching Method

After obtaining the signal strength vectorx=rssiAP1,rssiAP2,rssiAP3,rssiAP4 of the unknown location point, the Mahalanobis distance is used as the standard to measure the similarity between x and the location fingerprint data in the matching method. The smaller the Mahalanobis distance, the greater the similarity between the corresponding location fingerprint and x. On the contrary, the larger the Mahalanobis distance, the smaller the similarity between the corresponding location fingerprint and x. The Mahalanobis distance formula can be expressed as follows:
(5)d=x−mt×∑t−1×x−mtT,where x is the real-time WiFi signal strength vector collected by the robot at an unknown location, mt is the expected WiFi signal strength vector of the location fingerprint of the reference point t, and ∑t is the covariance matrix of the location fingerprint of the reference point t.


## 4.2.3. Improved AdaptiveK-Value WKNN Algorithm

The position fingerprint of the minimum Marxian distance can be calculated by Equation (5). However, using the coordinates corresponding to the minimum Marxian distance location fingerprint as the estimated coordinates of the unknown location point will make the error fluctuation of the algorithm localization larger, thus increasing the localization error. To solve this problem, an improved adaptive K-value WKNN algorithm is fused in the final stage of the algorithm. First, we use Equation (5) to calculate the Mahalanobis distance d between x and all location fingerprints. Then all Mahalanobis distances d are sorted in ascending order. After sorting, the smallest Mahalanobis distance is d1, the largest Mahalanobis distance is dN, N is the number of location fingerprints, and d1N is the difference in Mahalanobis distance between d1 and dN. We calculate the average value of Mahalanobis distance difference from the following equation:
(6)d¯=d12+d13+⋯+d1N−1+d1NN−1.The standard deviationS of the Mahalanobis distance difference is calculated by the following:
(7)S=∑t=2Nd1t−d¯2N−1.Ifd1t>S, then the corresponding location fingerprint will be excluded. Otherwise, keep it, and the number of location fingerprints at the remaining is K.In order to further eliminate outlier location fingerprints and retain location fingerprints that are effective for improving positioning accuracy, theseK location fingerprints are eliminated for the second time. First, we calculate the Euclidean distance between the coordinates x1,y1 corresponding to the fingerprint of the smallest Mahalanobis distance and the fingerprint coordinates of the other K−1 locations. They are marked as dist12, dist13,…, dist1k, where dist1k can be expressed as
(8)dist1k=x1−xk2+y1−yk2.Whendist1k>dmin, the location fingerprint will be removed from the K location fingerprints. The value of dmin can be adjusted according to different environments. After testing, better results can be obtained in the experimental environment of this article when dmin=1.Finally, the coordinates corresponding to the remainingk (k<K) position fingerprints are weighted:
(9)x,y=∑t=1k1/dt+ε∑t=1k1/dt+εxt,yt,where x,y is the final positioning result obtained by the robot, xt,yt is the coordinate of the reference point t, dt is the Mahalanobis distance corresponding to the fingerprint at the reference point t, and ε is a small positive integer, and its function is to prevent the denominator from being zero.


## 4.3. Navigation Method

In the stage of constructing the location fingerprint database of the positioning algorithm, the indoor environment is divided into equidistant grids. The vertices of each grid are used as reference points when building the location fingerprint database, and each reference point has a unique coordinate. The vertex at the upper left corner of the indoor plan is used as the origin of the coordinate axis. The right direction of the origin is the positive direction of thex-axis, and the bottom of the origin is the positive direction of the y-axis. In this design, the reference point spacing is set to 0.3 meters.In the navigation process, a grid navigation algorithm is used. First, the program has been waiting for the user’s navigation request. When the user passes through the navigation page of the robot control platform as shown in Figure6, the navigation destination is entered into the web page. After the user clicks to start navigation, the Raspberry Pi OpenWrt system can receive the user’s navigation request at this time. Then, the robot starts the positioning program to obtain the coordinates of the current position, and the coordinates of the destination point and the coordinates of the current position are made different. The displacement duration of the robot in the x direction and y direction is calculated according to the difference result and the walking speed of the robot, as shown in Equations (10) and (11).
(10)Tx=Xe−Xsv,(11)Ty=Ye−Ysv,where Xe is the abscissa of the destination point, Xs is the abscissa of the current location point, v is the robot walking speed, Tx is the displacement control time in the x direction, Ye is the ordinate of the destination point, Ys is the ordinate of the current location point, and Ty is the displacement in the y direction control time. Then, according to the displacement time in each direction, the robot is controlled to move from the starting point to the target point. During the movement, the robot always turns on the function of detecting obstacles. When obstacles are encountered during navigation, the obstacle avoidance algorithm is activated. After solving the obstacle problem, the positioning program will be restarted to obtain the current position coordinates, and then, the process just now continues to loop. If there are no obstacles during navigation, the robot can reach the end point smoothly and end the program. Figure 7 is a program flow chart of the grid navigation method.Figure 6
Navigation page.Figure 7
Grid navigation method program flow chart.


## 5. Experimental Design and Results

In order to verify the effectiveness of the improved WiFi location fingerprint location algorithm, we conducted a series of experiments in Laboratory 508, Comprehensive Building of Hechi University. Figure8 shows the real experimental environment of Figure 4. The laboratory is 10.5 meters long and 7.3 meters wide. In this indoor environment, 4 WiFi devices are arranged in different locations.Figure 8
Real indoor environment.


### 5.1. Experiments with Different Reference Point Spacing

The reference point spacing set by the traditional WiFi location fingerprint positioning algorithm is usually 1 meter, 1.5 meters, etc. In order to verify the effectiveness of reducing the reference point spacing to improve the positioning accuracy of the improved WiFi location fingerprint positioning algorithm, we compared the positioning performance of the improved WiFi location fingerprint positioning algorithm when the reference point spacing is 1.5 meters, 1 meter, 0.5 meters, and 0.3 meters. Figure9 shows the comparison of the cumulative error distribution functions of the four cases. It can be seen from the figure that as the distance between the reference points gradually decreases, the positioning performance of the improved WiFi location fingerprint positioning algorithm is getting better and better. Compared with the four reference point spacing situations, when the reference point spacing is 0.3 meters, the algorithm in this paper can achieve a better positioning effect. Theoretically speaking, reducing the distance between the reference points again may result in a better positioning effect. However, considering that the smaller the reference point, the greater the workload of collecting data, therefore, after comprehensive consideration, 0.3 meters is used as the reference point distance of the algorithm in this paper.Figure 9
Comparison of the cumulative error function of the algorithm in this paper in the case of 4 kinds of reference point spacing.


### 5.2. Collect Data at Different Time Periods and Collect Data at Fixed Time Periods

Figure10 shows 100 data of 4 WiFi devices collected by the robot at a reference point. These 100 data are collected in different time periods. It can be seen from the figure that the WiFi signals of the four WiFi devices fluctuate greatly at different times of the day, and the maximum fluctuation range of the WiFi signal of AP4 is -44~-57. However, the traditional WiFi location fingerprint algorithm usually collects data in a fixed period of time, and the number of times to collect data is relatively small. Therefore, the collected data is not complete. If the time of real-time positioning is different from the time period of data collection, it will bring greater positioning error.Figure 10
The signal strength values of 4 WiFi devices collected by the robot at the same reference point.In order to verify the positioning effect of data collected at different time periods and data collected at fixed time periods, we adopted different time period collection methods and fixed time period collection methods in the improved WiFi location fingerprint positioning algorithm. The final cumulative error distribution function of the two collection methods is shown in Figure11. It can be clearly seen from the figure that the positioning effect of the different time period collection method is better than the fixed time period collection method.Figure 11
Comparison of positioning effect between different time period collection methods and fixed time period collection methods.


### 5.3. Comparison of Improved WiFi Location Fingerprint Positioning Algorithm and Traditional WiFi Location Fingerprint Positioning Algorithm

The improved WiFi location fingerprint positioning algorithm in this paper has made a series of improvements on the basis of the traditional WiFi location fingerprint positioning algorithm. In order to verify the positioning effect of the improved algorithm, we carried out the experiment of the improved WiFi location fingerprint location algorithm and the experiment of the traditional WiFi location fingerprint location algorithm under the same experimental environment. The cumulative error distribution functions of the two algorithms are shown in Figure12. It can be seen from the figure that the probability of the traditional WiFi location fingerprint positioning algorithm positioning error below 0.4 meters is 14%, and the improved WiFi location fingerprint positioning algorithm positioning error probability is 49% below 0.4 meters. The probability of positioning error within 0.4 meters is increased by 35% on the basis of traditional algorithms. In addition, the probability of the traditional WiFi location fingerprint positioning algorithm with a positioning error within 0.2 meters is 0, and the improved WiFi location fingerprint positioning algorithm with a positioning error within 0.2 meters has a probability of 39%. The probability of positioning error within 0.2 meters has increased by 39%.Figure 12
Comparison of the cumulative error function of the two algorithms.


### 5.4. Robot Navigation Experiment

In order to verify the feasibility of the improved WiFi location fingerprinting algorithm for indoor positioning and navigation of the robot, we conducted several experiments in the absence of obstacles and with obstacles. It was found that the actual arrival position of the robot has a certain deviation from the given end position, which is caused by a certain error in positioning and the accumulation of errors during the robot navigation. The cumulative error distribution function of this deviation is shown in Figure13. As can be seen from the figure, the performance of the cumulative error distribution for navigation is a little worse than that of the improved WiFi location fingerprint positioning algorithm. However, the probability that the error of navigation is within 0.8 m can reach 62%. Therefore, the improved WiFi location fingerprint localization algorithm is feasible to be applied to the navigation of the robot.Figure 13
Cumulative distribution function of navigation error.


## 5.1. Experiments with Different Reference Point Spacing

The reference point spacing set by the traditional WiFi location fingerprint positioning algorithm is usually 1 meter, 1.5 meters, etc. In order to verify the effectiveness of reducing the reference point spacing to improve the positioning accuracy of the improved WiFi location fingerprint positioning algorithm, we compared the positioning performance of the improved WiFi location fingerprint positioning algorithm when the reference point spacing is 1.5 meters, 1 meter, 0.5 meters, and 0.3 meters. Figure9 shows the comparison of the cumulative error distribution functions of the four cases. It can be seen from the figure that as the distance between the reference points gradually decreases, the positioning performance of the improved WiFi location fingerprint positioning algorithm is getting better and better. Compared with the four reference point spacing situations, when the reference point spacing is 0.3 meters, the algorithm in this paper can achieve a better positioning effect. Theoretically speaking, reducing the distance between the reference points again may result in a better positioning effect. However, considering that the smaller the reference point, the greater the workload of collecting data, therefore, after comprehensive consideration, 0.3 meters is used as the reference point distance of the algorithm in this paper.Figure 9
Comparison of the cumulative error function of the algorithm in this paper in the case of 4 kinds of reference point spacing.


## 5.2. Collect Data at Different Time Periods and Collect Data at Fixed Time Periods

Figure10 shows 100 data of 4 WiFi devices collected by the robot at a reference point. These 100 data are collected in different time periods. It can be seen from the figure that the WiFi signals of the four WiFi devices fluctuate greatly at different times of the day, and the maximum fluctuation range of the WiFi signal of AP4 is -44~-57. However, the traditional WiFi location fingerprint algorithm usually collects data in a fixed period of time, and the number of times to collect data is relatively small. Therefore, the collected data is not complete. If the time of real-time positioning is different from the time period of data collection, it will bring greater positioning error.Figure 10
The signal strength values of 4 WiFi devices collected by the robot at the same reference point.In order to verify the positioning effect of data collected at different time periods and data collected at fixed time periods, we adopted different time period collection methods and fixed time period collection methods in the improved WiFi location fingerprint positioning algorithm. The final cumulative error distribution function of the two collection methods is shown in Figure11. It can be clearly seen from the figure that the positioning effect of the different time period collection method is better than the fixed time period collection method.Figure 11
Comparison of positioning effect between different time period collection methods and fixed time period collection methods.


## 5.3. Comparison of Improved WiFi Location Fingerprint Positioning Algorithm and Traditional WiFi Location Fingerprint Positioning Algorithm

The improved WiFi location fingerprint positioning algorithm in this paper has made a series of improvements on the basis of the traditional WiFi location fingerprint positioning algorithm. In order to verify the positioning effect of the improved algorithm, we carried out the experiment of the improved WiFi location fingerprint location algorithm and the experiment of the traditional WiFi location fingerprint location algorithm under the same experimental environment. The cumulative error distribution functions of the two algorithms are shown in Figure12. It can be seen from the figure that the probability of the traditional WiFi location fingerprint positioning algorithm positioning error below 0.4 meters is 14%, and the improved WiFi location fingerprint positioning algorithm positioning error probability is 49% below 0.4 meters. The probability of positioning error within 0.4 meters is increased by 35% on the basis of traditional algorithms. In addition, the probability of the traditional WiFi location fingerprint positioning algorithm with a positioning error within 0.2 meters is 0, and the improved WiFi location fingerprint positioning algorithm with a positioning error within 0.2 meters has a probability of 39%. The probability of positioning error within 0.2 meters has increased by 39%.Figure 12
Comparison of the cumulative error function of the two algorithms.


## 5.4. Robot Navigation Experiment

In order to verify the feasibility of the improved WiFi location fingerprinting algorithm for indoor positioning and navigation of the robot, we conducted several experiments in the absence of obstacles and with obstacles. It was found that the actual arrival position of the robot has a certain deviation from the given end position, which is caused by a certain error in positioning and the accumulation of errors during the robot navigation. The cumulative error distribution function of this deviation is shown in Figure13. As can be seen from the figure, the performance of the cumulative error distribution for navigation is a little worse than that of the improved WiFi location fingerprint positioning algorithm. However, the probability that the error of navigation is within 0.8 m can reach 62%. Therefore, the improved WiFi location fingerprint localization algorithm is feasible to be applied to the navigation of the robot.Figure 13
Cumulative distribution function of navigation error.


## 6. Conclusion

In this study, our main work is to make corresponding improvements to the traditional WiFi location fingerprint positioning algorithm, so that its positioning accuracy can meet the accuracy requirements of the robot’s indoor positioning and navigation. In order to improve and optimize the traditional WiFi fingerprint positioning algorithm, we research and analyze which factors will affect the positioning accuracy of the traditional WiFi fingerprint positioning algorithm, and we have verified the influence of these factors on the positioning accuracy of the traditional WiFi fingerprint positioning algorithm through experiments. Based on these influencing factors, the traditional WiFi location fingerprint positioning algorithm has been improved as follows: the reference point spacing of the traditional algorithm is reduced, the WiFi signal is collected by the different time period collection method, the standardized processing method is used to construct the standardized location fingerprint database, the matching method using the Mahalanobis distance as the similarity reference is adopted, and the improved adaptiveK-value WKNN algorithm is integrated. In addition, based on the improved WiFi location fingerprint positioning algorithm, we propose a grid navigation algorithm to achieve robot indoor navigation. The final experimental results show that the probability of positioning error within 0.4 m and 0.2 m of the improved positioning algorithm is 49% and 39%, respectively, which is 35% and 39% higher than that of the unmodified positioning algorithm. In addition, the probability of indoor navigation error within 0.8 meters can reach 62%. These experimental results are sufficient to show that the robot indoor positioning and navigation based on the improved WiFi location fingerprint positioning algorithm is feasible.



---

*Source: 8274455-2022-01-31.xml*