A combined algorithm for tunnel personnel localization based on error areal division

In a tunnel personnel positioning system, the average positioning error is typically used to reflect the precision and accuracy of the positioning algorithm. However, in practical applications, the error areal distribution is generally non-uniform. The positioning errors of some areas are greater than the average positioning errors, which lead to a low positioning accuracy. In this study, based on the simulation of the positioning error areal distributions of the quadrilateral centroid localization and maximum likelihood estimation algorithms, the causes for large positioning errors in upper and lower edges and four corners were analyzed. In addition, a combined localization algorithm based on error areal division was proposed to improve the average positioning accuracy. Thus, the quadrilateral centroid localization algorithm was used for the middle section of the tunnel personnel location area, the maximum likelihood estimation algorithm was used for the upper and lower edges, and the centroid algorithm was used for the four corners. The simulation results show that the average positioning errors of the combined localization algorithm were reduced by 5.56% and 44.76% when compared with those of the quadrilateral centroid localization and maximum likelihood estimation algorithms, respectively, while the maximum positioning error was reduced by 46.45% and 42.81%, respectively.


Introduction
With the development of tunnel engineering in China, indoor positioning technology has become widely used in tunnel engineering. In tunnels, the construction environment is poor, 1 the reference node layout is irregular, and the positioning signal attenuation is large, which lead to an uneven error in areal distribution in the tunnel personnel positioning system, where the positioning errors of some edge areas are greater than the average positioning errors. Therefore, it is necessary to find a method to reduce the maximum positioning error of some edge areas. In this study, the positioning error distribution characteristics of common algorithms were studied, the cause of large positioning error was analyzed in some edge areas based on the simulation results, and a combined localization positioning algorithm for tunnel personnel based on error areal division is proposed. The purpose was to improve the positioning accuracy and safety of tunnel personnel during construction.
The most commonly used wireless tunnels positioning technologies in tunnels include ZigBee technology, chirp spread spectrum (CSS) technology, and ultrawideband (UWB) technology. ZigBee can achieve realtime positioning of tunnel personnel, which requires a large number of reference nodes. 2,3 UWB technology has strong anti-interference and high ranging accuracy; however, it has low transmission effective distance and high cost. 4,5 Compared with the above methods, CSS technology has a lower transmission power, longer transmission distance, and lower cost. 6,7 Considering the feasibility of the technology, high-performance requirements, and cost of tunnel personnel positioning systems, CSS technology was selected for the proposed tunnel personnel positioning system. The most commonly used measurement technologies in tunnels include time of arrival (TOA), 8 time difference of arrival (TDOA), 9 angle of arrival (AOA), 10 and received signal strength indicator (RSSI). 11 TOA and TDOA require high-precision time synchronization between the reference nodes, and the hardware cost of the system is high. The AOA is greatly affected by the environment and antenna, such that the error is relatively large. The RSSI is based on the wave propagation loss model of the signal in free space, for which there is no need for time synchronization or an additional transmission module. This technology has low cost and high feasibility. Therefore, in this study, the RSSI positioning method was selected for the proposed tunnel personnel positioning system.
At present, the most commonly used tunnel personnel positioning algorithms include the centroid algorithm, maximum likelihood estimation algorithm, weighted centroid algorithm, trilateral measurement algorithm, quadrilateral measurement algorithm, trilateral centroid localization algorithm, and quadrilateral centroid localization algorithm. The characteristics, evaluation indices, and simulation environments of the above-mentioned algorithms are listed in Table 1. The centroid algorithm is often used in indoor positioning technologies. The cost of this algorithm is low, and the algorithm itself is simple; however, this algorithm is not suitable for a complex positioning environment. 32 The weighted centroid algorithm [28][29][30][31] is based on the centroid algorithm with the addition of a weighted factor. Researchers have improved the positioning accuracy by continuously optimizing the weighted factor. The trilateral measurement algorithm [21][22][23] is easily affected by the actual environment when measuring the distance between the reference node and the positioning node, which results in three circles being unable to intersect at one point. Based on the trilateral measurement algorithm, a group of reference nodes is added to the quadrilateral measurement algorithm 19,20 to reduce the influence of closed areas; however, there is still a problem with four circles not intersecting at one point. The maximum likelihood estimation algorithm [24][25][26][27] can solve this problem and improve the positioning accuracy. The trilateral and quadrilateral centroid localization algorithms [12][13][14][15][16][17][18] locate the centroid through the intersections of three or four circles, respectively. In the early stage, the most widely used positioning algorithm is the trilateral measurement algorithm; however, the accuracy of the trilateration measurement algorithm is low. Among the improved localization algorithms proposed by researchers based on this algorithm, the quadrilateral centroid localization and maximum likelihood estimation algorithms are commonly used as they have higher positioning accuracy. Therefore, the quadrilateral centroid localization and maximum likelihood estimation algorithms were selected to simulate the areal distribution of the positioning error.
In summary, researchers generally use optimized and improved measures of ranging and positioning algorithms to improve the overall areal positioning accuracy, as evaluated by the average positioning error. A rectangle was used as the simulation area, with a few simulation nodes. This method could not reflect the areal distribution characteristics of the positioning error as no research that used this method has been reported in the literature. The remainder of this article is organized as follows: the following solutions are proposed. Section ''Algorithm and parameters'' introduces the principles of two common algorithms and determines the simulation parameters combined with the particularity of a tunnel environment. Section ''Simulation and distribution of the positioning error area'' discusses the reasons for the large positioning error in some edge areas. Section ''A combined algorithm for tunnel personnel localization based on error areal division'' presents the proposed combined localization algorithm based on error areal division and the simulation in a tunnel environment. Conclusion is presented in section ''Conclusion.''

Algorithm and parameters
Quadrilateral centroid localization algorithm A quadrilateral centroid localization algorithm is proposed based on the characteristics of the trilateral measurement algorithm, centroid algorithm, and CSS technology. As shown in Figure 1, there are a positioning node (X) and four reference nodes (C 1 , C 2 , C 3 , and C 4 ) in a tunnel personnel positioning system. Suppose the coordinates of the four reference nodes are C 1 (x 1 , y 1 ), C 2 (x 2 , y 2 ), C 3 (x 3 , y 3 ), and C 4 (x 4 , y 4 ), the measured distances between the positioning node and the reference nodes are d 1 , d 2 , d 3 , and d 4 . Theoretically, the four circles will intersect at one point, which is the positioning node. However, in the actual environment, the measurement signal will be reflected, diffracted, and scattered, which will lead to ranging error. Therefore, the four circles would intersect in pairs to form a closed quadrangle area (the yellow area in Figure 1) instead of The trilateral centroid localization algorithm is used to locate the position node n times. , and the coordinates of the positioning node are X(x, y), then O(x 11 , y 11 ) can be obtained as Similarly, the coordinate values of P, Q, and R can be obtained by equation (1), and the coordinates of the centroid can be obtained using equation (2) x = 1 4

Maximum likelihood estimation algorithm
A schematic diagram of the maximum likelihood estimation algorithm 33,34 is shown in Figure 2. Suppose there are reference nodes C 1 (x 1 , y 1 ), C 2 (x 2 , y 2 ), ..., C n (x n , y n ), the distances between the positioning node and the reference nodes are d 1 , d 2 , ..., d n , and the coordinates of the positioning node are X(x, y), then equation (3) can be obtained as ::: After transformation, the following equation can be obtained ::: Equation (4) can be expressed in the matrix form AX = b as follows The RSSI value of the reference node is used to estimate the position of the adjacent node, and then the weighted centroid value of the adjacent node is used to determine the location of the unknown node.
2 y 2 À y n ð Þ ::: ::: ::: Using the least squares method, the least squares solution can be obtained aŝ The ranging error K in a tunnel environment The characteristics of wireless electromagnetic wave propagation in a tunnel environment conform to the indoor logarithmic distance path loss model described in Wu et al. 35 As shown in equation (9) PL where d 0 is the reference distance (generally set at 1 m for an indoor channel), PL(d 0 ) is the path loss of the reference distance d based on Wang, 36 PL(d 0 ) = 32.5 in a tunnel environment, d is the distance between the reference node and the positioning node, and g is the path loss exponent, which is set between 2.1 and 3.3 for an indoor channel environment and to 3.0 in a tunnel environment. X s is independent of the distance between the reference node and the positioning node, and is usually set to 0 for convenience in calculation.
In actual environment, the measurement signal will be reflected, diffracted, and scattered, which will lead to the ranging error K. Based on the wireless electromagnetic wave propagation model in a tunnel environment and the measurement data in Wang, 36 the distance between the reference nodes was set to 60 m. Considering the width of the tunnel, the distance between the reference node and the positioning node was only 61.40 m, and the original ranging error K was set from 0.6 to 3.0 m.

Determination of the simulation parameters in the error area
At present, three one-way three lanes are widely used in motorway designs. Based on the code for the design of highway tunnels (JTG D70-2004), the tunnel excavation width was taken as the simulation environment width of the tunnel, which was set to 17 m. Owing to rough surface resulting from tunnel excavation, it is difficult to achieve an accurate rectangular layout for the reference node. Therefore, the positioning area was taken as an isosceles trapezoid in the simulation process. The simulation parameters are presented in Table 2. A large ranging error causes a large positioning error; thus, ranging errors of K = 2.4 and 3.0 m were simulated.

Simulation and distribution of the positioning error area
Based on the ranging error and simulation parameters in the tunnel environment, this study simulated the positioning error areal distribution of two types of tunnel personnel positioning algorithms (i.e. quadrilateral centroid localization and maximum likelihood estimation algorithms). The areal simulation characteristics of the two algorithms were obtained, which provided the basis for the error areal division in section ''A combined algorithm for tunnel personnel localization based on error areal division.'' The positioning error e i was used to evaluate the accuracy of the positioning algorithm, as shown in equation (10) where (x s , y s ) are the theoretical coordinates of the positioning node, and (x g , y g ) are the estimation coordinates of the positioning node estimated by the algorithm.
Simulation of the distribution of the positioning error area using the quadrilateral centroid localization algorithm Using the parameters listed in Table 2, the distribution of the positioning error area was simulated using the quadrilateral centroid localization algorithm with Simulation of the distribution of the positioning error area using the maximum likelihood estimation algorithm Using the simulation parameters listed in Table 2, the distribution of the positioning error area was simulated using the maximum likelihood estimation algorithm with ranging errors of K = 2.4 and 3.0 m. The distribution of the positioning error area is shown in Figure 4. It can be seen that the distribution of the positioning error area using the maximum likelihood estimation algorithm was small in the middle and large on the left and right sides. The maximum positioning error occurred at the lower right corner of the positioning area, and was larger than the average positioning error.

Analysis and discussion of the simulation results
A comparison of the positioning errors between the quadrilateral centroid localization algorithm and the maximum likelihood estimation algorithm is shown in Table 3. It can be seen that the average positioning error of the quadrilateral centroid localization algorithm is smaller than that of the maximum likelihood estimation algorithm; however, the maximum positioning error is greater than that of the maximum likelihood estimation algorithm. Therefore, the quadrilateral centroid localization algorithm was mainly used in the areal division, and the maximum likelihood estimation algorithm was used in areas with large errors.
The following is an analysis for the causes of the large positioning error in areal distribution based on the quadrilateral centroid localization algorithm. Using the simulation parameters listed in Table 2, taking K = 3.0 m, and positioning nodes are X 1 (30, 8.5) and X 2 (30,2), the circles were drawn by taking the reference nodes (C 1 , C 2 , C 3 , and C 4 ) as the center of the circle and the distance from the reference node to X 1 as the radius. In order to make the image more concise, only curves in the closed area were retained. D 1 represents the theoretical distance from the reference node C 1 to the positioning node X 1 , and d 1 represents its measured distance with ranging error. Due to the  positioning error in the actual situation, the circle curve generated by measured radius will form a closed area (the yellow area in Figure 5). Similarly, the area where X 2 is located can be analyzed. The centroid area of the positioning node (X 1 (30, 8.5) and X 2 (30, 2)) in the upper and lower edges was shown based on the quadrilateral centroid localization algorithm. Figure 5 shows that with the same ranging errors, as the positioning node moves closer to the lower edge, the symmetry of the y-coordinates of the upper and lower vertices of the quadrilateral region becomes worse (with respect to the horizontal line). The quadrilateral centroid localization algorithm used the centroid of the algorithm to estimate the theoretical location of the positioning node. Therefore, the positioning error in the lower edge of the positioning area was larger, that is, the closer to the lower-edge line, the greater the error. This analysis was also applicable to the upper edge.
Next, taking the top left corner as an example, the causes of the large positioning error in the four corners are analyzed. As shown in Figure 6, when K = 3.0 m, the blue areas was defined as the four corners. Taking the reference nodes as the center of the circle, the distance from the reference node to positioning node, X 3 , as the radius, theoretically, the four circles would intersect at point X 3 . D 1 represents the theoretical distance from the reference node C 1 to the positioning node X 3 , and d 1 represents its measured distance. Due to the ranging error in the actual situation, the circle curve would form a closed area (the yellow area in Figure 6). The yellow area represents the actual centroid area.
The yellow area in Figure 6 represents the centroid area of the positioning node solved using the quadrilateral measurement centroid algorithm. The observations show that most of the estimated positions of this algorithm were outside the positioning area, which was inconsistent with the actual situation, and thus needs further improvement.
A combined algorithm for tunnel personnel localization based on error areal division A combined localization algorithm is proposed based on error areal division according to the distribution characteristics of the error area shown in Figures 3 and  4, which was determined using the quadrilateral centroid localization, maximum likelihood estimation, and centroid algorithms. The specific strategies are as follows: the quadrilateral centroid localization algorithm was used for the middle area of the tunnel personnel positioning area, the maximum likelihood estimation algorithm was used for the upper and lower edges, and the centroid was used to replace the estimated locations of all the positioning nodes in the four corners.

The localization algorithm for the four corners
Based on the distribution of the positioning error area simulated using the quadrilateral centroid localization   algorithm (Figure 3), the localization of the four corner areas is shown in Figure 7 (when K = 3.0). In this study, the centroid O of the triangle was used as the estimated coordinates (x g , y g ) of all the positioning nodes in the area. In those areas, the distance d i from the centroid O to any node X i is the positioning error e i of the node X i . The area is very small (The average area is 1.1233 m 2 .), and the distance d i is also very small. The triangular areas of C 1 and C 4 were exactly the same (as well as those of C 2 and C 3 ); thus, the positioning errors for the triangular areas of C 1 and C 2 were analyzed.
Assuming the coordinates of nodes X a , X b , and X c are X a (x a , y a ), X b (x b , y b ), and X c (x c , y c ), respectively, the coordinates of the centroid O of area are as follows The distances from the three nodes X a , X b , and X c to centroid O are In the area, the farthest node to the centroid O can only appear on the three vertices of the triangle. From equations (10) and (12), that is, d max is the maximum value of the positioning error.
The maximum positioning error e max is According to equations (11)-(13), the maximum positioning error of area of C 1 was e max = 1.0917 m, while that of C 2 was e max = 1.1142 m.
Through an analysis of the area of C 1 and C 2 , it can be concluded that the maximum positioning error in the four corners of the reference node was 1.1442 m, which basically met the requirements of the tunnel personnel positioning accuracy. Therefore, selecting the centroid to replace the estimated coordinates of all positioning nodes can effectively reduce the positioning error.

The localization algorithm for the upper-and lower-edge areas
According to the distribution of the algorithm for the positioning error area with different ranging errors (as shown in Figures 3 and 4) to study how to divide the positioning error area reasonably. The middle area in Figure 3 is a concave polygon. Based on the concept of compatible triangulation, 37,38 the constraint conditions can affect the presentation of the concave polygon image. To make the generated image sufficiently saturated, the middle area in the non-concave polygonal areas was divided when the grid was constructed for analysis and calculation. In this study, three line segments were selected to replace the upper-and loweredge arcs, whereas the four corner areas were directly replaced by triangular areas. The quadrilateral centroid localization algorithm was used for the white area and the maximum likelihood estimation algorithm for the yellow area. The blue area used its centroid to represent the estimated location of all positioning nodes in the area. The middle area was divided into three parts (left, middle, and right) by two red dotted lines. This method not only avoids concave polygons but also gives full benefits of the quadrilateral centroid localization and maximum likelihood estimation algorithms.
All the parameters in the areal division of the combined localization algorithm were observed based on the distribution of the positioning error area (as shown in Figures 3 and 4), and the results of the division are shown in Figure 8. D is the edge length of the triangles  at four corners, L is the edge length of the upper and lower areas, S is the lateral distance between the reference nodes, K is the ranging error, and W is a parameter of the upper and lower areas which related to S. In the simulation of the tunnel personnel positioning system, D was set at 1.5 m and S was set at 60 m. L was set at 30 m when K was 3.0 m as well as L was set at 36 m when K was2.4 m. The relationship between L, S, and K is L = S 2 10. The relationship between W and S is W = 0.05S.
Simulation and distribution of the positioning error area of the combined localization algorithm Using the simulation parameters in Table 2, the distribution of the positioning error area was simulated using the combined localization algorithm with ranging errors of K = 2.4 and 3.0 m. The distribution of the positioning error area is shown in Figure 9, combined with Figures 3 and 4. It can be seen that the positioning errors for the four corners using the combined localization algorithm were significantly reduced, while the positioning errors for the upper and lower edges were improved. The location of the maximum positioning error from the middle of the four corners or the loweredge area to the upper right corner of the upper-edge area also changed significantly. The positioning errors of the entire area were reduced to various degrees.
It can be seen from Figure 9 and Table 3 that with ranging errors of K = 2.4 and 3.0 m, the average positioning errors of the combined localization algorithm were 0.6965 and 0.8347 m, respectively. This resulted in reductions of 7.28% and 3.89%, respectively, in comparison with the quadrilateral centroid localization algorithm and 43.47% and 46.04%, respectively, in comparison with the maximum likelihood estimation algorithm. The maximum positioning errors of the combined localization algorithm were 1.6312 and 1.8651 m, respectively, which resulted in 44.09% and 48.81% reductions, respectively, in comparison with the quadrilateral centroid localization algorithm, and by 40.12% and 45.49% compared with the maximum likelihood estimation algorithm. Thus, both the average and maximum positioning errors of the combined positioning algorithm were significantly reduced.

Conclusion
1. Applying the simulation parameters, an isosceles trapezoid simulation area with an irregular reference node layout and more than 90,000 unknown nodes was determined in a tunnel environment. The characteristics of the positioning error areal distribution were determined using the quadrilateral centroid localization and maximum likelihood estimation algorithms. The causes of the formation of large positioning errors were analyzed. 2. Based on the characteristics and analysis of the positioning error areal distribution of two common algorithms, a combined localization algorithm for tunnel personnel based on error area division is proposed. 3. The positioning area was divided into three parts: middle, upper, and lower edges, and four corners. The quadrilateral centroid localization algorithm was used for the middle area, the maximum likelihood estimation algorithm for the upper and lower edges, and the centroid algorithm for the four corners. The simulation results show that the average positioning errors of the combined localization algorithm were reduced by 5.56% and 44.76% compared with those of the quadrilateral centroid localization and maximum likelihood estimation algorithms, respectively, while the maximum positioning errors were reduced by 46.45% and 42.81%, respectively. 4. The results of this study can help improve the positioning accuracy of tunnel personnel positioning system and the rescue efficiency for tunnel personnel during dangerous accidents. The distribution and division of the positioning error area also provide a new reference for other indoor positioning fields.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.