The Global Optimal Placement of BLE Beacon for Localization based on Indoor Map

Anchor Nodes in a localization system obviously play a crucial role in determining the system’s quality. Their placement directly affects the localization accuracy and their number directly impacts the total cost of the system. Nowadays, the deployment of Bluetooth nodes in industry generally relies on the experience knowledge of engineers and the cost of positioning beacon does not considered the global level. In this paper, we put forward a method to extract the number and location of BLE beacon automatically and ensure a high positioning accuracy of the indoor positioning system based the rules of indoor positioning, which use all kinds of space objects and structure characteristics of indoor map. The triangulation method was selected to study the global optimal placement of BLE beacon for localization based on indoor map. The impacts and requirements of BLE beacon placement were systematic analysed from the triangulation positioning method, indoor positioning environment and indoor user distribution characteristics. According to the characteristics of indoor environment structure and user distribution, we built an optimization model of BLE beacon placement method based on genetic algorithm which can generate the number and the location of BLE beacon. At last, the Bluetooth indoor positioning prototype system is developed to compare the experience method deployment scheme and the global optimization deployment scheme in the real indoor positioning environment.


INTRODUCTION
In recent years, people's demand for location based services has gradually extended from outdoor to indoor.Indoor positioning technology has grown up to become a hot spot in academic and industrial circles.Various positioning techno 1 logies and methods such as Wi-Fi, Bluetooth, UWB, geomagnetism, optical communication, and inertial navigation have emerged.Among them, Bluetooth positioning technology has the advantages of high security, low cost, low power consumption, small size, easy deployment and implementation, and generally supports mainstream mobile terminal devices such as smart phones and tablet computers and is one of the most widely used types of technology in the industry.At present, research on Bluetooth indoor positioning pays greater attention to improving the accuracy and efficiency of positioning of signal control and positioning algorithm optimization.There are few researches on the deployment method of Bluetooth nodes, and the deployment of anchor nodes is regarded as future work.The number and placement of Bluetooth devices directly determine the quality of the indoor positioning system.At present, the deployment of Bluetooth nodes in the industry generally relies on the experience of engineers.However, the indoor environment is complicated, the spatial layout and the topological relationship are variable, and the implementation of the anchor nodes deployment by the empirical method has low efficiency.Under this condition, empirical method cannot ensure effective positioning accuracy in each region, and does not consider the cost of positioning the anchor nodes at a global level.With the rapid development of the Internet of Things technology and indoor positioning technology, some scholars have been conducted research work on indoor positioning nodes deployment, analysed the influencing factors of wireless sensor node deployment, and achieved certain results.Various * Corresponding author, rling1990@163.comoptimization methods such as PSO algorithm, simulated annealing algorithm and genetic algorithm are gradually applied in the anchor nodes deployment process.However, in the existing research results, the analysis of the influencing factors of indoor positioning anchor nodes deployment is not systematic enough, and the relationship between positioning error and node deployment is not comprehensively analysed; the ruled rectangular or cuboid area is generally used in the anchor nodes deployment process, ignoring the complex structural features of indoor space; the anchor nodes deployment process does not take into account the active area and distribution characteristics of indoor pedestrians; the experimental analysis of the existing research is mostly realized by simulation and simulation implementation, and no verification and application are carried out in the real environment.This paper aims to automatically extract the location of the Bluetooth anchor nodes to be deployed according to the indoor positioning rules based on various spatial objects in the indoor map, and ensure that the indoor positioning system has higher positioning accuracy, which enables the node positioning of the indoor positioning system to be more effective.This paper chooses the most common triangulation method at present, based on two-dimensional indoor map, quantitatively analyses the influencing factors of Bluetooth anchor nodes deployment in depth, determines the optimal deployment distance according to the positioning rules and Bluetooth signal propagation characteristics, and fully consider the structural characteristics of indoor space, combine the distribution rules of indoor pedestrians, and build a global optimization model for Bluetooth anchor nodes deployment with the goal of least using Bluetooth at the end.

RELATED WORKS
Considering the problem of anchor nodes placement, only minimum literature has been published so far to the best of our knowledge.Baala et al. showed via measurements that the number and placement of the APs can have substantial impact on the position accuracy.But the authors do not propose a systematic way for finding an optimal AP deployment, rather the results are based on experiments.Shinsuke and Fukumura analysed the relation between the localization error and the average target to nearest anchor node distance, the number of anchor nodes, and the channel parameters in a RSS-based localization system.Dulmage et al. presented RSS estimation error significantly degrades the distance estimation accuracy as the distance increases.Aomumpai et al. showed that the location and the number of reference nodes affect the localization accuracy, he also found that placing the reference nodes at the intersection of corridors within the building could reduce the positioning error up to 35 % compared with others locations of reference nodes.Most of the previous studies on anchor placement are empirical: anchors are frequently placed at random within the environment.Piwowarczyk et al. described parameters that can be used to evaluate the quality of reference nodes placement and its influence on the network terminal positioning accuracy.
After analysed the influence factors in the placement of anchor nodes, scholars put forward some methods on the optimal placement of reference points for indoor positioning.Most of the researches are based on triangulation method for indoor positioning.Shinsuke and Fukumura first shown a design method to determine the placement of anchor nodes satisfying a required localization accuracy In RSSI-based localization.Zhao et al. proposed an AP location optimization method based on the Differential Evolution algorithm.In this method, the Euclidean distance of the RSS array between all the sampling points is maximized, by which the positioning accuracy can be improved.He at al. proposed a rapid and optimal AP deployment scheme based on genetic algorithm, which maximizes the signal space Euclidean distance between the APs.The simulation results pointed out that "the more the better" rule does not necessarily hold, though the number of APs usually increases with the size of the target area.Farkas propose a simulated annealing based algorithm to place the WLAN access points to receive the signal of at least three reference APs everywhere in the given indoor area, but keep the number of deployed APs as low as possible.Shi et al. proposes a PSO-based optimizing mechanism to get the arrangement and layout of APs placement ， the simulation results provided a better design with higher accuracy and stability.Aomumpai, Supattra, et al propose a novel mathematical formulation using a Binary Integer Linear Programming (BILP) approach that can determine optimal number and locations to install APs in the target service area of the triangulation indoor positioning system.Tilman et al. presented a method for placing anchor nodes for lateration based wireless 3D indoor locating systems, which combines genetic optimization with radio impulse propagation simulation using a physical ray-tracer.
Summary of current state of researches, we can find that the main focus of indoor positioning is on algorithms for improving the localization accuracy or the computational efficiency, and the literature dealing with the problem of anchor placement is still remains limited.The impacts to be considered in the APs placement is not enough.Most researches use a simplified scenario with a rectangular area without take into account the effect of space structure in complex indoor environment and the users distribution in indoor.The ideal signal propagation model of RSSI is used and fewer study considered the severe multipath from signal reflection from walls and furniture, and the Non-Line-of-Sight (NLOS) conditions.

THE IMPACTS OF BIE BEACON PLACEMENT
The impacts of BIE Beacon placement analysed from three aspects: location algorithm, location environment and user distribution.

The Impacts in Positioning Method of Triangulation
Triangulation based positioning method is a well-studied method.After receive the signal strength sent by the iBeacon base station, the distance between the iBeacon and the positioning terminal can be calculated according to the Bluetooth signal attenuation model.When the number of terminal receives signals is equal to exceeds three and the coordinate of the iBeacon base station is known, the coordinate of the positioning terminal can be estimated.In this paper, the least square method is used to solve the coordinates of the positioning terminal.This method is simple and easy to implement.

The Horizontal Spacing in Placement
The obvious attenuation characteristics of the Bluetooth signal is the key to the positioning algorithm, which directly determines the spacing of the beacon deployment.This paper collected the signal strength data in the real indoor open scene with a smartphone at intervals of 0.5 meters.The relationship between the signal strength and the distance, as shown in the following figure.As can be seen from the above figure, as the horizontal distance of the terminal to beacon increases, the signal strength exhibits a significant attenuation characteristic.At the same time, the signal intensity error area is also increasing, and the impact on the positioning error is also increasing.When the distance exceeds 8 meters, the attenuation characteristics of the signal are not prominent.According to the principle of triangular positioning algorithm, the distance interval with obvious attenuation characteristics and less error range of Bluetooth signal strength should be selected as the horizontal spacing of Bluetooth beacon deployment.So, the horizontal spacing of Bluetooth deployment should not exceed 8m when using the BLE beacon in this paper.

The Number of valid BLE signals Received
The triangulation algorithm requires that at least three valid BLE beacon signals are received by the terminal.However, in the actual application process, most of the positioned terminals would receive more than three signals.Therefore, this paper studies the relationship between the number of valid signals

The Geometric Shape in Placement
The existing research literature in the field of indoor positioning proves that if the shape of the three positioning reference points is approximately equal to or equal to the equilateral triangle, the positioning error of the mid-point of the triangle is the smallest.Conversely, when the three positioning reference points are close to the collinear, the error is the largest.Equilateral Triangular Distribution of BLE beacon would provide higher positioning accuracy for triangulation.However, due to the influence of the indoor positioning space, it is impossible to ensure that all BLE beacon could be distributed in the triangle.In this paper, we tested and verified in influence of the geometry shape of the BLE beacon deployment in indoor positioning.

Obstacle and non-line-of-sight effect
NLOS refers to the existence of obstacles between the BLE beacon node and the terminal to be located, which greatly reduces the accuracy of indoor positioning.Figure 7.The influence of multipath effect

Connection of Subspace
The wall in the indoor space divides the indoor space into relatively independent subspace, which limits the propagation of Bluetooth signals.When locating objects from one room to another, it is necessary to switch back to the Bluetooth signal in the current room to continue positioning, which causes the positioning discontinuity, resulting in jitter and jumping of the positioning result, which seriously affects the user experience of indoor positioning.In order to the user experience when the positioning object passes through two relatively independent subspace, a special Bluetooth beacon needs to be deployed in the connected area to improve the positioning accuracy.The connected node in this paper refers to the key nodes in the connection area of two relatively independent subspace in the indoor space.After deploying a Bluetooth beacon at the connected node, positioning transition, continuity and smoothness would be better when the positioning object passes through the connected node from one room to another.

The Impacts in Users Distribution
Pedestrians are the main body of indoor positioning.In the indoor positioning, the spatial characteristics of user activities distribution should be fully considered to determine the BLE beacon placement.Therefore, we divide the location area into user-unreachable areas and reachable areas.Among them, the unreachable area includes obstacles, shelves, bookcases, etc.The reachable area is the placement area of the BLE beacon.In addition, in the reachable area, according to the frequency of pedestrian activities, it is divided into the main active area and the secondary active area.The focus of indoor positioning should be placed in the main active areas of the reachable areas, which are also the key areas for Bluetooth beacon deployment in this paper.

Basic thinking
(1) Making indoor maps.The indoor map is the information carrier of the indoor location service, and is also the basis for the calculation of the beacon placement method in this paper.All elements in the interior space must be collected and drawn in the indoor map.
(2) Grid split.In the indoor map, the location of the Beacon placement could be infinite, so this article converts continuous vector maps into grids by grid split, which facilitates subsequent calculations.
(3) Key point extraction.According to the structure of the indoor space, the key nodes to be deployed are extracted, including the connection of the subspace, the corner of the passage, the elevator, etc.
(4) Users distribution assignment.Collecting the movement characteristics of indoor users, combined with the indoor space structure, assigning values to grids in indoor map.
(5) Generate Initial Placement Solution.According to the rules of triangulation method, combined with the extracted key nodes and other influencing factors, we generate the initial placement scheme of beacons randomly based on indoor map grid.
(6) Optimize Bluetooth beacon deployment.Based on the indoor map grid, we construct a beacon placement scheme evaluate fitness function, and then use genetic algorithm to optimize the placement model.

Pre-processing based on indoor map
First of all, the indoor map must be split into 1m*1m grid.The centre point of each grid is used as a candidate location for BLE beacon placement.Secondly, Subspace connection points, channel corners, entrances and exits, and widely coverage nodes should be extracted.At last, according to the indoor space structure and the distribution of the user's region of interest, combined with the pedestrian movement characteristics in video surveillance, the user activity level in the grid is divided into four categories, and the assignment process is performed separately in each grid.

Initial Placement Solution generation
The indoor space is divided into continuous  ×  regular grids, and each grid unit in the indoor space is   , where 0 <  ≪ , 0 <  ≪ .The definition of    represents the benefit of each grid unit in the BLE beacon placement, and  Grid represents the overall benefit of the placement scheme.The definition of   represents the weight of each grid unit, which is determined by the frequency of users activity in each grid unit.The weight of the grid unit in the highest frequency of the user's activity is defined as 1, the weight of the unreachable area is defined as 0, and the weight of the grid of the other levels is between 0 and 1.
As shown in the figure below, 0 indicates that the grid can deploy beacons, -1 indicates that the grid cannot deploy beacons, and 1 indicates that the grid has deployed beacons.A grid unit was select as the initial BLE Beacon position randomly.The next Beacon location is generated according to the deployment spacing, and then a third Bluetooth is generated according to the principle of the equilateral triangle deployment, and the method is repeated until the initial beacon deployment method is generated. - Figure 10.Initial Placement Solution generation

Global optimization model
In the optimization process, this paper considers three factors, valid BLE signals received, the spacing of BLE beacons, and the Beacon signal arrival angle.The benefit    of each grid unit could be calculated as follow.
where N = the relationship between the number of Bluetooth beacons and the positioning accuracy L = the relationship between the spacing of BLE beacons and the positioning accuracy A = the relationship between the Beacon signal arrival angle and the positioning accuracy The overall benefit of the placement scheme  Grid could be calculated as follow.
where   = the weight of each grid unit in user distribution At last,   is the fitness function in genetic algorithm, and the maximum benefit value can be convergence in a certain range after selection, crossover and mutation operators.The placement scheme form maximum   is the global optimal scheme.

EXPERIMENT RESULTS
The method in this paper is verified in real indoor scenes.We choose a fourth floor in a building from Nanjing Normal University and developed an indoor positioning prototype system using Triangulation method as shown below.For the experimental environment in this paper, the calculation results are as follows.The result shown the positioning accuracy of global optimal placement in 3.6m (90%) and experience deployment in 5.4m (90%).Especially in areas where user activity is frequent, the positioning accuracy is higher, which is within 2.8m (90%).
Figure 13.The result in experimental environment Figure 14.The positioning accuracy in experimental environment

CONCLUSION
In this paper, we analysed the impacts of BIE Beacon Placement in detail firstly.Then, we put forward a method to extract the number and location of BLE beacon automatically and ensure a high positioning accuracy of the triangulation indoor positioning system based the rules of indoor positioning, which use all kinds of space objects and structure characteristics of indoor map.The effectiveness of the method was verified by experimental result.
In the future work, we want to achieve optimal placement of BLE beacons from the current single floor to multiple floors.In addition, the placement scheme for Wi-Fi and Bluetooth hybrid positioning is another research goal.

Figure 1 .
Figure 1.Relationship between the signal strength and distance received and the positioning accuracy.As shown in the figure below, in the open indoor positioning environment, according to the following BLE beacon arrangement, the circle radius is 6 meters, and 3-10 different numbers of Bluetooth signals are used for positioning, where the blue point indicates the BLE beacon and the red point represents the terminal to be located.

Figure 2 .
Figure 2. The Number of valid BLE signals Received After collect signal strength and calculate positioning coordinates, the relationship between the numbers of received valid signals and the positioning error is shown in the figure below.

Figure 3 .
Figure 3.The influence of the number of valid signals We realized that the number of valid signals received has an important influence on the positioning accuracy.The positioning error decreases with the increase of the number of valid Bluetooth signals received.When the number of received Bluetooth signals reaches a certain peak value, the positioning error does not change much.

Figure 4 .
Figure 4. Three reference points are close to the collinear

Figure 5 .
Figure 5. Non-line-of-sight effect In this paper, the effects of non-line-of-sight propagation on Bluetooth signals are analysed through experiments.Two situations are designed: barrier-free environment and obstacle environment.By collecting Bluetooth signals in two different environments, the effects of non-line-of-sight propagation on Bluetooth signal propagation are specified.According to the figure below, the obstacle has a serious influence on the non-lineof-sight propagation of the Bluetooth signal, resulting in a more unstable received signal and an increased variance.Therefore, it is necessary to consider the line-of-sight propagation of the Bluetooth beacon and the mobile receiving end to avoid obstruction of the Bluetooth signal by the obstacle in the placement of BLE beacon.

Figure 6 .
Figure 6.The influence of NLOS 3.2.2Wall and multipath effect The multipath effect greatly interferes with the stability of the Bluetooth signal, which often occurs when the Bluetooth deployment is near the wall or corner.The multipath is an important factor affecting the stability of Bluetooth signals.The following figure compares the propagation of Bluetooth signals at open spaces and corners.So, the placement of BLE beacon should be kept at a certain distance from the corners in the indoor environment.

Figure 8 .
Figure 8.The connection of subspace

Figure 9 .
Figure 9.The most widely covered key node extraction

Figure 11 .Figure 12 .
Figure 11.Experimental environment in this paper For the rule scenario, Figure 9(a) is a small space environment of 8 × 8 meters, Figure 9(b) is a large indoor space environment of 35 × 35 meters, the calculation results of this method are as follows.