GEOMAGNETIC FIELD-BASED INDOOR POSITIONING USING BACK- PROPAGATION NEURAL NETWORKS

High-precision indoor positioning in complex environments has always been a hot research topic within the positioning and robotic communities. As one of the indoor positioning technologies, geomagnetic positioning is receiving widespread attention due to its global coverage. Additionally, geomagnetic positioning does not require special infrastructure configuration, its hardware cost is low, and its positioning errors do not accumulate over time. However, geomagnetic positioning is prone to mismatching, which causes serious problems at the positioning points. To tackle this challenge, this paper proposes an indoor localization method based on spectral clustering and weighted back-propagation neural network. The main research contribution is that in the offline phase, the spatial specificity of geomagnetism is used to define the similarity between fingerprints. In addition, a clustering-based reference point algorithm is proposed to divide the sub-fingerprint database, and a positioning prediction model based on back-propagation neural network is trained. Subsequently, in the online stage, the weights of different positioning prediction models are calculated according to the defined fingerprint similarity, weighted average prediction coordinates are obtained, and thereby the positioning accuracy is improved. Experimental results show that, in comparison with other neural network-based positioning methods, the positioning error of our proposed algorithm is reduced by approximately 26.6% and the positioning time is reduced by 24.7%. Experimental results show that the average positioning error of the algorithm is 1.81m. * Corresponding author The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B1-2020, 2020 XXIV ISPRS Congress (2020 edition) This contribution has been peer-reviewed. https://doi.org/10.5194/isprs-archives-XLIII-B1-2020-557-2020 | © Authors 2020. CC BY 4.0 License. 557


INTRODUCTION
Recent advances in key technological innovations such as highperformance chips, 5G communication networks, and"Internet Protocol Version 6 (IPV6), has promoted the rapid development of pervasive computing technology (Bolad and Akcakoca 2018). At present, common indoor positioning technologies include infrared positioning (Mohebbi, Stroulia, and Nikolaidis 2017), Bluetooth (Cao et al., n.d.), Ultra Wide Band (UWB) (Duanyang et al. 2018), Radio Frequency Identification (RFID) (Seco and Jimé nez 2018), Wi-Fi(Mendoza-Silva, Torres-Sospedra, and Huerta 2017), ultrasonic (Medina, Segura, and De la Torre 2013), microphone array (Funke et al. 2014), among others. These positioning methods are based on the propagation of wireless signals, which are easy to obtain and can be located using existing indoor wireless networks. In an indoor environment with a large number of people (e.g., shopping malls, hospitals, etc.), the absorption of wireless signals by the human body cannot be ignored, so these methods are difficult to meet the application requirements of high-precision indoor positioning. Increasingly, researchers are turning their attention to indoor positioning technology based on the geomagnetic field. The geomagnetic field, as an inherent resource of the earth, has the advantages of being all-weather, all-area, low energy consumption, passive, no radiation, among others. Modern architectures widely use ferromagnetic materials, such as steel. These materials can produce abnormal values of the geomagnetic field, and thus form indoor magnetic fingerprints that are related to location. As such, the use of the geomagnetic field for indoor positioning has substantial potentials (Zhang et al. 2015).
At the Mobisy 2011 International Conference, the MIT Media Lab (Chung et al. 2011)used a self-developed magnetic model and a magnetic fingerprint acquisition device, which achieved a positioning accuracy of better than 1 m at the 88% probability level. In 2012, Stainford University EinenelM (Le Grand and Thrun 2012) developed an indoor magnetic fingerprint matching and positioning technology based on commercial intelligent terminals. They tested it in a classroom and they were able to achieve a positioning accuracy of 0.7 m in a straight path and 1.2 m in a circular path. In 2016, Li et al. (Li et al. 2016) used a Kalman filter to fuse geomagnetism and inertial navigation to enhance the positioning performance of areas with poor Wi-Fi signal coverage. The spatial distinguishability and stability of indoor geomagnetic features are analysed, and the feasibility of magnetic field information for indoor positioning is verified.
Recently, researchers have attempted indoor geomagnetic positioning using deep learning and artificial neural networks. Ruiqing proposed a geomagnetic positioning algorithm based on deep neural network, which first converts the geomagnetic observations from the time domain to the distance domain, and then extracts a recursive map of the geomagnetic observation sequence. The variation trend and length of the geomagnetic observation sequence are used as features. A deep neural network was developed, which recognizes the position information corresponding to each geomagnetic feature sequence to achieve positioning. Wang (Bayev et al. 2019)proposed a geomagnetic positioning system based on long-term short-term memory network (Long Short-Term Memory, LSTM). In 2017, Jiao Jichao and others (Jiao et al. 2017)used a deep convolutional neural network for camera image-based indoor positioning in a crowded environment. Jang et al. (Jang, Shin, and Choi 2018) proposed an indoor geomagnetic positioning model based on a recursive neural network (RNN). Their model combines the current threedimensional geomagnetic observations with past geomagnetic sequences to improve the geomagnetic spatial resolution, and optimized the number of hidden layer nodes and other parameters using Tensorflow (Bae and Choi 2019)to train millions of geomagnetic trajectory data. A meter-level positioning accuracy was achieved.
To solve the problem of expensive indoor positioning technology requirements, this paper uses natural geomagnetic technology without additional facilities, and proposes an indoor positioning method based on spectral clustering and weighted back propagation neural network. The paper is organized as follows: Section 1 introduces related research studies, Section 2 introduces the geomagnetic indoor positioning, Section 3 provides a detailed description of the algorithm, Section 4 presents experimental results and their analysis, and finally Section 5 draws some concluding remarks.

Fingerprint positioning
Geomagnetic positioning can be considered as a fingerprint positioning method (Huang et al. 2018). The idea of fingerprint positioning is derived from the pattern recognition theory, which estimates the physical location by matching it with the recorded fingerprints. To do so, the following two conditions must be met. Firstly, fingerprints are related to locations, and each location has its own unique fingerprint. In other words, the higher the fingerprint uniqueness at different locations, the higher the positioning accuracy. Secondly, the distance between different locations is related to the similarity between their fingerprints. However, in an actual indoor environment, there is no specific one-to-one correspondence between fingerprints and physical locations based on geomagnetic characteristics. On the other hand, because of limited storage, it is not possible to record fingerprints of all locations in an experimental environment. Therefore, we try to match locations with higher fingerprint similarity among the recorded fingerprints to reduce positioning errors.

Concept of geomagnetic indoor positioning
Geomagnetic fingerprint positioning is generally divided into two phases, namely the offline phase and the online phase. As shown in Figure 1, the offline phase collects geomagnetic fingerprint information in a pre-selected indoor area to establish a geomagnetic fingerprint database. When the target moves through the area where the geomagnetic reference map is established, the hardware embedded in the magnetometer can obtain the characteristic value information of the geomagnetic field in real time. Subsequently, the hardware matches it with the geomagnetic information in the geomagnetic fingerprint database by using related algorithms to match the collected geomagnetic signal with the fingerprint database. The most similar point in the database is chosen, which represents the precise location of the target. The fingerprint and physical locations do not correspond one-to-one in the actual indoor environment, and the user's location may not necessarily be recorded in the database during positioning. Therefore, the fingerprint positioning algorithm needs to learn a very complicated mapping relationship between the fingerprint and the location, or the similarity of fingerprints of different locations, and match or predict the physical location based on the fingerprint. Specifically, we refer to the database that stores related information as a fingerprint map. The location where the fingerprint is selected before localization is called the reference point (RP), while the predicted location is called test point (TP).

SWBN
Spectral clustering and weighted back propagation neural network (SWBN) algorithm attempts to improve the accuracy of indoor positioning by using natural geomagnetic characteristics only. In the offline stage, the similarity between fingerprints is identified based on the correlation of different geomagnetic spaces, and a reference point clustering algorithm based on spectral clustering is used in order to divide the sub-fingerprint database. In the online phase, a weighted back propagation neural network positioning algorithm is used in order to improve the positioning accuracy. The flow of the proposed SWBN positioning method is shown in Figure 2.

Principle
In order to improve the accuracy of the geomagnetic fingerprint reference map and improve the positioning accuracy, it is necessary to cluster the reference points using a clustering algorithm, so that the similarity of fingerprints of the reference points within the cluster is higher, and the similarity of the reference points between different clusters is lower. In this paper, we define the similarity between fingerprints, and use spectral clustering to cluster all collected reference points to divide multiple sub-fingerprint libraries.
The idea of spectral clustering evolved from graph theory(Ding et al. 2013) A weighted undirected graph is constructed by taking data samples as vertices and the relationships between data samples as edges, and then defining the similarity between data as edges. The process of data clustering involves dividing the weighted undirected graph into multiple optimal subgraphs, so that the data similarity in the subgraphs is high and the data similarity between different subgraphs is low. In essence, the spectral clustering algorithm is a process of clustering the feature vectors of the Laplacian matrix through K-means, which can be summarized as the following steps:

Reference point clustering algorithm based on spectral clustering
The proposed spectral clustering algorithm can be summarized as follows: (a) Calculation of the similarity matrix of geomagnetic fingerprint data: Since there is a similarity between the two reference points, the fingerprint similarity matrix S is a matrix of , which can be expressed as: The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B1-2020, 2020 XXIV ISPRS Congress (2020 edition) and j  represents thej th vertex; Take the relationship between any two reference points as the edge of an undirected graph: Represents the set of all edges in an undirected graph; the fingerprint similarity between the reference points is taken as the weight of the edges in the undirected graph, that is, the fingerprint similarity matrix S .
(c) Forming Laplacian matrix: The elements on diagonal line are obtained by accumulating S by row, that is, The normalized Laplacian matrix is then calculated using the D and the similarity matrices: (e) Use K-Means to cluster the feature matrix by rows K-Means clustering is performed on the feature matrix U to obtain a R P N -dimensional vector. Thej th element in C represents the cluster to which thej th reference point belongs (that is, the sub-fingerprint database).

Principle
According to the activation function ( ) f z passed to the next level (whether the cell body is activated), the output is (9) Neural networks add non-linear factors through activation functions to improve the model's ability to analyse and map complex problems.

SWBN Online Positioning
The online phase estimates the positioning of the object. When receiving the positioning request of the object, the processing flow of SWBN is as follows: process the data to construct the fingerprint vector of the object, calculate the positioning weight set of the object, and calculate the predicted coordinates according to the back propagation neural network positioning algorithm to obtain weighted prediction coordinates. The detailed algorithm flow is presented in Table1  The first step is data processing. The abnormal points of the geomagnetic data of the object are processed and normalized to obtain the fingerprint vector of the object, that is, the input of the weighted back-propagation neural network. The fingerprint vector of thei th point to be measured is denoted as   The third step is to calculate the location weight set of the fingerprint vector of the point to be measured. In the offline stage, the fingerprint database is divided into C N subfingerprint databases according to the reference point clustering method based on spectral clustering, and corresponds to C N BPNN location prediction model. Therefore, for this BPNN positioning prediction model, the weight set is calculated based on the similarity with the reference points in the sub-fingerprint database, and the positioning accuracy is improved by weighting.

Data acquisition
In order to verify the SWBN algorithm, we selected five floors of the School of Surveying and Mapping of Beijing University of Architecture as the experimental scene, as shown in Figure 3. The experimental environment is divided into four grid areas with dimensions of 1.2 × 27, 1.8 × 12, 2.4 × 10.4, 2.4 × 12m 2 . The reference two-dimensional coordinate system (grid coordinate system) is established with the floor grid as the standard, each grid is 0.6m, the walking step length along this interval is about 0.6m, the mobile phone is kept at the waist height, and points in the forward direction.
The data acquisition software developed based on IndooratAtlas software developed by the Nokia 7 smartphone is used to collect data at a sampling rate of 25 Hz to generate a three-dimensional vector with a unit of T  . The data collection time of each node in the grid is 10 s, that is, 10 sets of geomagnetic data values are collected, and the average value is taken to ensure the accuracy of geomagnetic data.
The reference points and test points are evenly distributed in the area to be measured. The solid points in the figure are the data collection reference points, a total of 421.

To construct a fingerprint map of geomagnetism
The establishment of a high-precision database is essential for geomagnetic positioning. The stronger the magnetic field, the more accurately the position can be determined.
Building an accurate magnetic field map (centimeter or subcentimeter accuracy) in the offline phase can be achieved in an indoor environment because the built-in triple magnetometer of the smartphone always has a high sampling rate (25 Hz). In addition, for the unacquired area, geomagnetic data is obtained by interpolating the sparse data intervals to generate values between these reference points (one sample point interval is 0.1 m). As shown in Figure 4, a geomagnetic reference map is generated. From the figure, we can find that the geomagnetic characteristics of different regions are very obvious. The Bayesian non-parametric method is used to interpolate the magnetic field. The prior knowledge about the characteristics of the magnetic field is incorporated into the Gaussian process (GP).
Three geomagnetic features were extracted during the experiment. Previous research experiments (Qiu et al. 2019)showed that compared with the total magnetic strength alone, if the three-component geomagnetic values of x, y and z match, the accuracy is higher, so this paper stores x, Threecomponent geomagnetic value of y and z. The interpolation method is used to create three magnetic fingerprints, respectively in the direction of gravity, the horizontal direction and the composite direction of the magnetic field.
After acquiring the magnetic field strength fingerprint data, convert the fingerprint to a magnetic field strength value pattern and store it in the fingerprint database. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B1-2020, 2020 XXIV ISPRS Congress (2020 edition)

Analysis of experimental results
To assess our algorithm, we compared our proposed positioning method with some traditional indoor positioning methods FIFS (Xiao et al. 2012) and Deep Fi (Wang et al. 2015).
As shown in Figure 5, Table 2-3, the method used in this paper is better than FIFS and Deep Fi. When using the Deep Fi positioning method, the average error distance of the positioning is 2.34m, the minimum error distance is 0.79m, and the maximum error distance is 3.41m. The probability of the error distance within 1m is 11%, the probability of the error distance within 2m is 25%, and the probability of the error distance within 3m is 89%. Compared to the initial library positioning accuracy, the positioning accuracy of the Deep Fi positioning method is improved by 22.6%.  When using the FIFS positioning method, the average error distance of the positioning is 2.61m, the minimum error distance is 0.87m, and the maximum error distance is 3.76m. The probability of the error distance within 1m is 7%, the probability of the error distance within 2m is 31%, and the probability of the error distance within 3m is 76%. Compared to the FIFS positioning method, the positioning accuracy of the initial library is improved by 30.6%.

CONCLUSIONS
SWBN uses the spatial correlation of geomagnetism, divides the sub-fingerprint database through the reference point clustering algorithm of spectral clustering, and uses weighted backpropagation neural network positioning algorithm to predict the weighted coordinates of objects. By deploying actual positioning environments and collecting geomagnetic data, constructing a geomagnetic reference map, and comparing it with some existing fingerprint positioning algorithms (Deep Fi, FIFS method) from different fingerprint perspectives. The experimental results show that SWBN can provide higher positioning precision and reduce training time.
Although the positioning method proposed in this paper achieves better positioning accuracy, there are still several things to be improved in the future research work: (a) Resist the heterogeneity of hardware equipment and make full use of geomagnetic 3D information: As this paper analyses geomagnetic information in actual scenarios, it is found that the data information is very unstable. This may be related to the collection equipment, such as antenna differences or local clocks out of sync. Therefore, in the subsequent work, the differences in geomagnetic data collected by different equipment will be studied and processed, and effective data will be extracted to further enrich the position fingerprint to improve the positioning accuracy.
(b) Study the algorithm of updating the fingerprint database: Since the positioning method proposed in this paper is based on the idea of deep learning and uses the deep neural network to tackle the positioning problem. When the fingerprint database is updated, the trained model can be further fine-tuned based on the idea of transfer learning. However, this paper does not perform actual verification. Therefore, in the subsequent work, experimental data is periodically collected, and the storage and update methods of the fingerprint database are studied in depth based on transfer learning. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B1-2020, 2020 XXIV ISPRS Congress (2020 edition) This contribution has been peer-reviewed. https://doi.org/10.5194/isprs-archives-XLIII-B1-2020-557-2020 | © Authors 2020. CC BY 4.0 License. 562