An Algorithm of Mobile Robot Node Location Based on Wireless Sensor Network

— In the wireless sensor network, there is a consistent one-to-one match between the information collected by the node and the location of the node. Therefore, it attempts to determine the location of unknown nodes for wireless sensor networks. At present, there are many kinds of node localization methods. Because of the distance error, hardware level, application environment and application costs and other factors, the positioning accuracy of various node positioning methods is not in complete accord. The objective function is established and algorithm simulation experiments are carried out to make a mobile ronot node localization. The experimnettal results showed that the proposed algorithm can achieve higher localization precision in fewer nodes. In addition, the localization algorithm was compared with the classical localization algorithm. In conclusion, it is verified that the localization algorithm proposed in this paper has higher localization accuracy than the traditional classical localization algorithm when the number of nodes is larger than a certain number.


Introduction
The general conditions of the mobile robot working environment is complex, and some areas are not even suitable for human to stay, so in order to ensure that the robot can successfully complete the task, the operator needs to control the real-time location of their work [1].Therefore, the mobile robot needs to be tracked and positioned during operation.Wireless sensor networks have the function of mutual positioning between nodes, and mobile robots can only be tracked by the corresponding positioning service, and then complete the task [3].Therefore, it is very important in practice to apply the localization function of wireless sensor networks to the localization of mobile robots [6].
The process of sensor node location is to identify the position of the node to be located (known as the unknown node) according to a certain positioning mechanism by using a few known location beacon nodes (also known as anchor nodes) [8].Therefore, after the unknown node is correctly positioned, it can locate the specific location of the event that the sensor node monitors.Thus, the accurate positioning of the sen-sor nodes is the primary condition for the monitoring of the location information service [2].The nodes are placed on the mobile robot, they constitute a mobile wireless sensor network nodes, so the localization problem of the mobile robot can be transformed into the problem of locating the nodes on the robot.
In the wireless sensor network, the general structure is shown in figure 1.On the one hand, the nodes participating in the work are limited in the energy supply due to the condition, and because of this reason, its function will be greatly reduced [4].On the other hand, because of the low cost of node production, a large number of nodes have to be involved to complete the task.This poses a very high requirement for the localization technology and localization algorithm of unknown nodes.Therefore, it is necessary to develop a scientific and effective localization algorithm for mobile robots based on the inherent characteristics of low energy consumption, low production cost, insufficient storage and communication capacity, and computational capability of the mobile robot [5].

Global Internet
Fig. 1.The node structure and system structure of the sensor network

State of the art
In 1949, the US Navy launched anti-submarine sonar monitoring system research program.In 1960s, during the Vietnam War, when the target was moving in the vicinity of the sensor, the sound and vibration of the target will be detected by the tropical tree.Tropical trees will immediately send the data to the strategic command center by radio waves.Through the use of related technologies, the command center integrates information data to get the vehicle's direction, location, number and other important information.Then, the decision maker decided to take the next step, such as command fighter bombing.iJOE -Vol.13, No. Compared with some developed countries, the research of wireless sensor networks in China is relatively late, but the development is very rapid.The research on wireless sensor networks mainly focuses on miniaturization and intelligentization of sensor nodes, topology control, network protocols (including routing protocols and MAC protocols), node location and target tracking, data fusion, Qo S protection and reliability design, and network security and so on.Most of the domestic research still stays at the simulation level.Due to the fact that the actual environment is complex and uncertain, there is still a big gap from the practical application.
In summary, most of the above-mentioned positioning algorithms require expensive equipment to support the operation of the algorithm, and it is critical to the stability of the environment.Therefore, in this paper, we proposed a localization method for mobile robot nodes, and carried out the simulation experiment.In the simulation experiment, after selecting the objective function, the algorithm is optimized by the ranking method.The experimental results show that the proposed algorithm can achieve higher localization precision in fewer nodes.In this paper, the environmental parameters, namely the path loss factor k, are calculated, and the calculated value of k is simulated and analyzed by using the optimized localization algorithm.At last, this paper compared the localization algorithm with the classical localization algorithm.

Environmental parameters
In the existing ranging algorithm, the ranging algorithm based on signal strength (RSSI) is one of the most common localization algorithms in wireless sensor network [7].It does not rely on the assistance of additional expensive equipment, only uses the signal strength of the received wireless signal to judge, and then calculates the relative distance between the transmitter and receiver.Because of the influence of the transmission medium, such as the electromagnetic wave, the signal propagation model and parameters of different media environment are also different.If the fixed signal propagation model and parameters are used to calculate the signal strength and distance between the receiver and transmitter, the result is certainly unscientific.Therefore, this paper presents a method to calibrate the environmental parameters, and carries on the parameter calibration experiment.
In the calculation, we need to determine the two parameter values: environment parameter k and node parameter P + G, that is, the path attenuation factor, the transmission power P of the node and the antenna reception gain G of the node (with respect to the node, the relative change is not large), but K changes with the change of the external environment, and has a great influence on the measurement results, so it needs to be calibrated in time.
In the case where the different receivers are away from the source distance d, the RSSI values are tested by the following equations: There are n measurement positions, d=d1, d2, ... , dn, respectively, the following equations can be obtained: From the above calculation process, we can calculate the transmitter power P and the antenna gain G of the node and the path attenuation factor k, so as to realize the calibration of the parameter k. iJOE -Vol.13, No. 5, 2017 The value of the environmental parameter k is often estimated empirically.The actual environment parameters and unknown nodes in the simulation process can be set manually.This section uses the following process for simulation: In the Figure 2, we first select the environment parameter k in a real environment, and then set the unknown node location and combine the actual environment parameters with the above formula to generate a large number of beacon nodes' position and signal strength information.By using the generated beacon nodes to carry out calibration calculation, the calibration results are combined with the beacon node information to calculate the localization error of unknown nodes; by using the actual environment parameter and the generated beacon node information to calculate the localization error of the node; by using the estimated environmental parameter and the generated beacon node information to calculate the positioning error of the unknown node.At last, we compare and analyze the positioning errors of the three calculations.
In order to make the simulation results more scientific, several sets of beacon nodes are generated in the simulation.The distribution of the nodes is similar to that in Figure 3, where the red point is the unknown node and the beacon node is scattered in the tested area as far as possible.At the same time, each group of data will be calculated for different beacon nodes, and then the average value and the maximum value are calculated for the same set of data.

Positioning algorithm principle
Referring to Figure 3, in the three-dimensional coordinate system, the surface of the graph is the theoretical distribution of the signal strength with distance under the environment where the unknown node is located, among them, the X-axis and Y-axis are used to measure the distance from the beacon node to the unknown node, and the Z-axis is used to measure the received signal strength at the location of the beacon node.
In the Figure 4, p1, p2, p3…pn are the actual positions of the beacon nodes in the three-dimensional coordinate system, and L1, L2, L3……Ln is the offset of the beacon node relative to the actual signal strength.Since the shape of the surface in the figure is related to the path attenuation factor k and the coordinates of the unknown node, so we can construct the appropriate objective function to find the coordinates of k and unknown nodes.As can be seen from the Figure 4, if the surface is offset a short distance in the direction perpendicular to the z-axis, the offset of each beacon node must iJOE -Vol.13, No. 5, 2017 Paper-An Algorithm of Mobile Robot Node Location Based on Wireless Sensor Network be changed.It is not difficult to see that when the surface shape and surface location closer to the unknown node signal strength of the theoretical surface, the corresponding calculated k and the coordinates of the unknown node is more accurate.
The wireless sensor network positioning principle that proposed in this paper can be described as follows, assuming there are n (n> 3) sensor beacon nodes, and the position coordinates of each beacon node are known, the signal strength RSSI (i) of i node to unknown node in beacon node is known.According to the logarithmic normal distribution path loss model of the signal, the objective function is established.By finding the optimal solution of the objective function, the coordinates (x, y) of the unknown node and the path attenuation factor k are determined.

Establish the objective function
According to the principle of localization, we can construct the appropriate objective function, and get the coordinates of the unknown node and the path attenuation factor k by solving the optimal solution of the objective function.Then we discuss how to construct the objective function.In order to minimize the z-distance of a node to a surface in a model, that is, there are n nodes in total, the objective function can be constructed as: Another objective function is to find the algebraic sum of n nodes (Zn (i)-RSSI (i)), and then find the absolute value of the result: http://www.i-joe.org

Algorithm simulation experiment
In order to analyze the localization effect of each objective function when the unknown node is located, it is necessary to use the simulation software to compare the calibration results of each objective function, so as to choose more scientific objective function for in-depth analysis.

Simulation process
The node localization algorithm that proposed in this paper is realized by M language programming on matlab2010b simulation platform.In the simulation environment, the unknown nodes and the beacon nodes are distributed in a plane area of 15m * 15m.Steps can be seen in figure 4.
Generate a beacon node: First of all, to determine the parameters of the simulation model, in matlab using three-dimensional drawing command to draw the model surface.Since the location information and the signal strength of the beacon node are known during the simulation, so the theoretical value of the beacon node can be taken on the model.The resulting beacon nodes consist of x, y coordinates and the signal strength at that point, each node produces a set of data.In the simulation, 50 sets of data are taken at one time.Data is added to random noise: After the theoretical signal strength of the beacon node is obtained in the previous step, the Gaussian random noise of the signal noise is added to the data.The mean value of the noise signal is 0 and the standard deviation is the initial value.The theoretical value of the signal and the algebraic sum of the noise signal constitute the actual signal strength of the beacon node.
Data filtering: Due to the large number of data, there are some individual beacon nodes too far from the unknown node, the actual unknown nodes cannot receive the signals.In this case, if the data are taken into the next step, the calculated positioning error is not large, which is not conducive to improve the positioning accuracy.Therefore, it is necessary to optimize the data before the screening.
Determine the optimal initial value: Using the optimization function of matlab to optimize the calculation, the initial value of the determination will affect the accuracy of the results.For this reason, other localization methods are used to carry out the initial positioning before the optimization calculation.In this paper, we use the maximum likelihood method to determine the initial value, that is, first select some data in the data set, use the maximum likelihood method to calculate a rough unknown node, and then use the optimization function in matlab to optimize the calculation.
Optimization calculations: We invoke the preparation of the target function file, use the optimization function in matlab to optimize the calculation, and obtained the position coordinates of the unknown node and the value of the path loss factor k, and compared with the set values in the initialization to calculate the errors.Result drawing: Using the matlab drawing command output the error comparison chart.

The selection of objective function
According to the simulation flow and the objective function in the last chapter, the number of unknown nodes is 5i (i = 1 ~ 10).When the values of k are 2, 3, 4, we calculate 50 sets of data and get the simulation results (Figure 5).
Figure 5 shows that under the condition of the objective function is the sum of the absolute values, the sums of squares, the sum of square root, and the absolute value after summation, the simulation results of select different Gaussian random variables and different path loss factors.From the average error and maximum error, the average error curve and the maximum error curve of the absolute value of the objective function are compared with the error curve of the other objective function, the variation range and the trend of the error indicate that the function corresponding to the absolute value after summation is not the best objective function.Therefore, it will be rounded out in the follow-up simulation study.In the remaining objective function, the performance of the sum of square and the sum of absolute values is good, and the performance of the sum of square root is in general.Therefore, the follow-up study will focus on the sum of the squares and the sum of absolute values as the objective function.As can be seen from Figure 6, the node location method adopted in this paper can effectively locate the nodes.When the number of nodes is small, the curve appears inflection point.When the number of nodes gradually increased, the curve becomes smooth and slow.This indicates that the further increase of the number of beacon nodes has a weak influence on the positioning accuracy.

The calculation of k values
According to the simulation flow of Figure 8, we can calculate the node coordinates, at the same time, calculate the path loss factor K. Since the actual range of k is In the Figure 7, the maximum value of the calculated value of k is mostly above the true value.The sum of square root in the objective function fluctuates too violently with respect to the sum of square and the sum of absolute values.Therefore, when select the objective function, the sum of square root is removed.While the sum of the absolute values and the sum of square are relatively stable, and the fluctuation range is smaller and better than the other objective function in the maximum value of the calculated value of k, so it is appropriate as the objective function.
Conclusion: The sum of the absolute values and the sum of the squares in the objective function are suitable as the optimal objective function, which is beneficial to the improvement of the path attenuation factor.

Conclusion
In this paper, we proposed a localization method for mobile robot nodes, and carried out the simulation experiment.In the simulation experiment, after selecting the objective function, the algorithm is optimized by the ranking method.The experimental results show that the proposed algorithm can achieve higher localization precision in fewer nodes.In this paper, the environmental parameters, namely the path loss factor k, are calculated, and the calculated value of k is simulated and analyzed by using the optimized localization algorithm.At last, this paper compared the localization algorithm with the classical localization algorithm.The simulation results show that the localization algorithm proposed in this paper has higher localization accuracy than the traditional classical localization algorithm when the number of nodes is larger than a certain number.

Fig. 6 .
Fig. 6.Maximum error of node position Conclusion: The sum of absolute values and the sum of square is most suitable for the objective function.

Fig. 7 .
Fig. 7.The mean value of the calculated value of k 5, 2017Paper-An Algorithm of Mobile Robot Node Location Based on Wireless Sensor Network