A novel correction weighted localization algorithm for quadrilateral ranging

Localization technologies based on received signal strength indication (RSSI) have been widely used in indoor localization, however, RSSI is disturbed by transmitted power of equipment, infinite interference source and so on. To overcome this drawback, this paper proposes a novel correction weighted localization algorithm for quadrilateral ranging. The algorithm uses Gaussian-moving average filtering (GMAF) to process the data and regularized least square estimation to estimate the parameters of the log-normal shadowing model. Then, a weighted correction factor is introduced to locate the target node. Finally, the simulation and experimental results verify the accuracy and robustness of the proposed algorithm.

and robust localization, and a suitable sensor distribution mode is used to locate the target nodes.
The structure of this paper is as follows. In Section 2, based on the existing algorithms about indoor localization, the proposed algorithm is introduced. In Section 3, we use MATLAB simulation to compare the localization results and errors of the proposed algorithm with those of the other three algorithms. In Section 4, the experimental result of the proposed algorithm is provided. Finally, the conclusion and prospect are drawn in Section 5.

GMAF data processing
To better modify the obtained RSSI data, this paper combines Gaussian filtering and moving average filtering, then proposes GMAF.

Gaussian filtering
In this paper, Gaussian filtering is used for correction. First, using the 2σ guideline, extract the data meeting the area (RSSI − 2σ, RSSI + 2σ). Secondly, the appropriate template is selected to obtain the corresponding weighted formula, and the measured RSSI values are scanned and modified one by one to obtain a group of more accurate RSSI values. Take the template size r=2 as an example.
When r=2, the previous RSSI value has a great influence on the current RSSI value, so it is assumed that the number is taken to the left, and the template is: The modified RSSI value is: Replace the original value with modified _ . The accuracy of modification is closely related to the size of the template selected. Next, discuss the size of the template. We use MATLAB to simulate a set of data obey N(30,2), the original data and r = 2, 3, 4, 5 four kinds of template size to modify the data, and the results are shown in Figure 1(a) It can be seen from the Figure 1(a) that the red curve is smoother, so the results with the template size of 2 are more accurate.

Secondary modification of moving average filtering
In this paper, moving average filtering is used for secondary modification. Through Gaussian filtering, a length of 5 columns of data is obtained, and the arithmetic mean value is recorded. After a new modified data is obtained, insert it into the tail of the new data column, and remove the head of the column data, then record its arithmetic mean value, by that analogy, we can get a new set of RSSI values. Finally, the average value of this set of data is used as the final RSSI value. (b) Analysis of filtering results An example of a set of data with capacity 150 that obeys N (60, 1) is provided, Figure 1(b) shows that after the above filtering process, the final data is more accurate.

Log-normal shadowing model and parameter estimation
In the log-normal shadowing model [7], the conversion formula between RSSI value and distance d is The signal fading is affected by environmental factors, and the parameters are related to the environment. To fully consider environmental factors, this paper uses regularized least square estimation (RLSE) to estimate the parameters A and n. Assuming a target node P, anchor nodes 1,2, ⋯ , are arranged around the target node, and the distances between anchor nodes and target node P are 1,2, ⋯ , .
We use the least square method to estimate the two parameters in the equation

 
A,n A,n 2 2 n n n 2 2Â Where ‖ ‖ is -norm. Get the normal equation by taking the partial derivative The estimated values of the two parameters are obtained by the RLSE algorithm and applied to the log-normal shadowing model.

A novel correction weighted localization algorithm for quadrilateral ranging
In this paper, a new quadrilateral correction weighted localization algorithm is proposed to further improve the accuracy of the localization, and a new sensor distribution mode is adopted to increase the stability of the sensor network while using the algorithm.
The four anchor nodes , , , , , , , that are closest to the target node are used for localization. As shown in Figure 2:  Figure 2 Improved quadrangle correction for weighted localization Firstly, RSSI processed by GMAF in Section 2.1 is substituted into the log-normal shadowing model (3) to calculate the distance between 1,2,3,4 and the target node, sort them and you get , , , ，they meet . If three nodes are collinear among the four nodes, the node with the smallest distance is selected from the remaining anchor nodes, and the node farthest from the target node is replaced.
Then, four combinations of J J J , J J J , J J J , J J J are respectively used to carry out the traditional trilateral localization [6] of the target node to obtain the localization nodes , , , . What's more, the locations of anchor nodes , , , are used to make the weighted corrections for the above-mentioned localization nodes.
The correction factor is Taking as an example, let line segment be the connection with the endpoints of , and anchor node be a circle with the center of , and the radius of , and the intersection point of line segment and circle be , . The correction process is as follows P P C P r 0 0 0 P P C P 0 r 0 0 = + -P P C P 0 0 r 0 P P C P 0 0 0 r x y x y m n x y x y x y m n x y x y x y m n x y x y x y m n x y are the location of the four localization nodes after correction.
Finally, after weighting, the final localization nodes Q , is obtained.

Simulation
In this paper, least square algorithm, weighted nonlinear least square algorithm, weighted centroid algorithm and the proposed method are compared. MATLAB simulation is used to verify the accuracy of the proposed algorithm, and 50 randomly distributed target nodes are located.
The errors of the four algorithms are shown in Table 1.  Figure 3 (a). It is shown that the error of the proposed algorithm is about 0.12, which is better than other algorithms.
The RMSE is smaller, the accuracy of algorithms is higher. Figure 3(b) shows that the relationship between the average RMSE and the variance of RSSI used. The RMSE increases with the increase of the variance. Obviously, the proposed algorithm is the best of the four algorithms.

4.Experiment
In the indoor environment, this experiment is carried out in a regular hexagon with 3m side lengths. To the accuracy of the experiment, there is no interference from other electronic signals except the experimental equipment, as shown in the Figure 4 The relationship between RSSI and distance RSSI measured at different distances is shown in Figure 4(b). A=-49.1273 and n=4.0216 were estimated by using this set of data.  Figure 5. Due to the influence of experimental equipment and the randomness of data, some experimental results cannot show the advantages of this algorithm. However, the above simulation results show that the proposed algorithm has higher localization accuracy and stronger robustness.

5.Conclusion
This paper presents a quadrilateral correction weighted localization algorithm based on GMAF. The biggest advantage of this algorithm is that the localization error caused by the algorithm is greatly reduced: Firstly, the GMAF is proposed to obtain more accurate RSSI. Secondly, the RLSE is used to estimate two parameters of the log-normal shadowing model. Finally, the target node is localized by using the quadrilateral correction weighted localization algorithm. Through simulation and experiment, we confirm that this algorithm has good robustness and environmental adaptability. In the actual localization, the accuracy of the quadrilateral correction weighted localization algorithm based on GMAF has reached the centimeter level and controlled at about 0.105m. This method can not only be used for indoor localization, but also be of great help to the location detection of landslides in remote areas.