Mobile localization in complex indoor environment based on ZigBee wireless network

An algorithm for mobile robot localization in complex indoor environment is introduced in this paper. The robot is designed as a special node of ZigBee network, so the robot localization is transformed into the location of ZigBee mobile node. For reducing error, the localization method adopts and improves the RSSI ranging technology. Further, the distance is corrected by the least square method, and the three sides’ measurement is used to calculate the coordinates of the robot. The experiments were carried out in two environments: narrow and complex laboratory, and spacious hall. The results show that the system can realize the function of data acquisition, transmission, processing and display. It can satisfy the localization requirement in indoor environment. Compared with the traditional algorithm, the maximum positioning error is reduced.


Introduction
Navigation is one of the most challenging abilities of mobile robots. Successful navigation is based on the success of four modules: perception, positioning, recognition and motion control. Where am I is the problem of location. In the past decades, it has received the greatest attention and made a lot of significant progress.
Because of the shielding of reinforced concrete, GPS positioning can not play a role in indoor environment. Traditional track estimation method is puzzled by various geometric errors, and the positioning effect is unsatisfactory. Positioning based on landmarks and beacons is undeniably an effective and reliable method, but it generally requires significant environmental transformation. It is time-consuming and expensive. In recent years, wireless sensor network(WSN) based on ZigBee technology has been developing rapidly. ZigBee sensor nodes have been installed indoors and outdoors in many places. Prospective researchers have married WSN with mobile robot technology, which greatly expands their respective capabilities and adds a new method to positioning.
The location based on ZigBee network is similar to the environment beacon method. It sets up several reference nodes with known locations to locate the mobile target nodes. In this paper, the existing WSN nodes in space can be used as reference nodes for robot localization. These nodes are arranged in the environment to provide security information in the previous research. Therefore, no more environmental modification is needed, only CC2431 nodes which can detect RSSI value of signal strength are installed on the robot to be localized.
RSSI signal location is affected by object occlusion and antenna characteristics. It is suitable for application in the case of single spatial structure, but the practical application environment may be more complex. In recent years, with the deepening of research, more and more ZigBee localization algorithms have emerged, and the positioning accuracy has also been greatly improved. Each A considerable part of the existing literature focuses on the weight acquisition improvement of weighted centroid algorithm. Long et al. uses the theory of triangle trilateral equal positioning error minimum to get a better centroid weighting value, and then using the weighted centroid positioning algorithm to improve positioning accuracy [1] . Cui et al. firstly uses multilateral positioning to get the target position, and then uses the reciprocal of positioning error as the weight to improve the centroid algorithm, so as to improve the accuracy [2] . However, the above algorithm only gives simulation verification, whether it can withstand various interference factors in practical application is unknown. Liu et al. uses the method of dynamically modifying weights to make each reference node acquire weights adaptively for centroid positioning [3] . Finally, the positioning experiment in the mine is given.
Stepien et al. uses the basic RSSI value ranging and trilateral positioning method, but its characteristic is that it develops a fixed and mobile node circuit system for indoor venues such as art galleries [4] . Lee et al. also uses trilateral measurement to locate the mobile target [5] . However, it is interesting to propose a minimum Bayesian error estimation method based on Gauss distribution, which can reasonably allocate the location of fixed nodes and accurately locate the mobile target nodes with the least number of fixed nodes.
The second category of literature is about other factors affecting RSSI. In another literature, the path loss factor n is measured by different distance experiments, and then the n is dynamically weighted to improve the accuracy of trilateral centroid positioning [6] . However, the experiment is completed by routers and wireless network cards, not ZigBee system. Le et al. considers the influence of indoor obstacles on RSSI strength, the concept of barrier potential energy and a new weighted centroid algorithm are proposed to improve the accuracy [7] .
In this paper, RSSI algorithm is improved to increase its positioning accuracy in complex indoor environment, and the indoor positioning error is decreased from 1.59m to 0.66m. At the same time, a complete, simple, effective and practical positioning system is designed. The positioning data are transmitted to the host computer through WiFi for real-time processing and display in the human machine interface.

Signal model for RSSI location computation
The location calculation adopted by CC2431 is based on a simplified signal model [8] , as shown in follow: (1) Among them, A is the absolute value of receiving energy intensity at 1m distance of transmitter with unit of dBm. The parameter m represents the loss of signal propagation. It is the rate of signal attenuation with the increase of space distance, that is, the attenuation value of signal intensity for every increase of 1m distance of signal propagation. The values of parameter A and m affect the relationship between RSSI and signal transmission distance d.
To improve the RSSI positioning accuracy, the following aspects should be started: first, to improve the trilateral measurement method; second, to modify the RSSI value of the response of the reference node.

Correction of the measured distance between the mobile node and the reference node
The distance based on RSSI ranging method is used, and the least square method is used to correct the distance. The corrected method can effectively compensate for the errors caused by environmental impact, so that the coordinates of mobile nodes can be estimated more accurately.
Firstly, the actual distance yi from the mobile node to each reference node is measured; secondly, the distance xi from the mobile node to each reference node is measured according to formula 1.
In combination with formula 1, the relationship between the corrected distance y* and the estimated distance is obtained as follows:

Trilateral Ranging Combined with Centroid Location
As shown in figure 1, the three circles obtained by trilateral measurement are surrounded by three intersections, but there are no common intersections. The introduction of centroid location algorithm in trilateral ranging method is to take the average of the three intersections as the coordinate value of mobile nodes. This improved method effectively compensates for the defect of trilateral measurement method. It is known that the distances from mobile nodes to reference nodes are ra, rb and rc, and the coordinates of A, B and C reference nodes are (xa,ya), (xb,yb) and (xc, yc), respectively. According to the distance formula between the two points, the below formula can get: When measuring, every time the coordinating node receives information from the mobile node, it sends it to the upper computer for processing. Each measurement is carried out independently, and the positioning itself will have certain errors, so the measured data will be different each time. Thus, the coordinate values displayed on the upper computer interface have been changing. Therefore, the average values of three times of data are used as the coordinates of the final mobile node, as shown in formula 8: , , 3 3 x x x y y y xy

Selection of Reference Nodes for Location
The chip CC2431 is embedded with a positioning engine, which requires 3 to 16 reference nodes. Considering the cost, the system uses four reference nodes. The three nearest reference nodes are always chosen to participate in the calculation, because the farther the node is, the greater the impact of the environment, which results in the RSSI value of the location node is much different from the accurate value. In order to reduce the random error, RSSI values are filtered. The specific method is to set up mobile nodes to send ten broadcasts to reference nodes, read ten RSSI values, remove one maximum and one minimum, and then average them.

Positioning experiment of complex indoor environment
The indoor environment is a square area of 7.3m×7.3m, plus a semi-circle area with a diameter of 4.1m. The layout is shown in figure 2. It can be seen that the environment is very complex, the personnel exchanges are frequent, the indoor facilities and electronic equipment are complex and redundant.
Node   Figure 3. Hardware of Mobile robot localization system The experiment uses the development kit combination CC2430 and CC2431, using four reference nodes, one coordination node and one mobile node. Coordination nodes and mobile nodes are placed on a wheeled robot, as shown in figure 3. The robot is not only a node of the network, but also the organizer of the network. This arrangement enhances the mobility and flexibility of the network. The embedded processor on the robot can process and send positioning data in real time, which is a prominent feature of the system.
In the experiment, the positioning effect before and after the improvement of the algorithm is tested. Indoor electromagnetic interference is more, and the movement of personnel also has an impact on the measurement. When the unmodified algorithm is used, the measured coordinates are extremely unstable and the fixed positioning results can not be determined. Especially when the fourth and sixth groups of measurements are taken, the position of the robot is close to the edge of the site, which results in obvious edge effect, so the deviation is large. After the improvement, the positioning error decreased from 1.66m to 0.8m. It has certain applicability to complex indoor environment.

Conclusion
The improved RSSI localization algorithm designed can meet the localization requirements of indoor mobile robots. In practical application, WSN nodes in the environment can be used as reference nodes to save the cost of environmental renovation.
The positioning experiment shows that the improved algorithm improves the positioning accuracy obviously in the complex indoor environment. The simpler the electromagnetic environment is, the fewer the environmental obstacles are, and the smaller the relative positioning error is. However, the larger the positioning range is, the larger the absolute positioning error is. In the future, it will consider the problem of locating reference nodes and mobile nodes in three-dimensional space which are not in the same plane.