Indoor positioning system based on magnetic fingerprinting-images

Ahmed Gamal Abdellatif Ibrhaim, Mostafa Mohamed Ahmed, Andrea Masiero, Adel Zaghloul Mahmoud, Mohamed E. Nasr, Fathi Elsayed Abdelsamie Zagazig University Department of Electronics and Communication, Faculty of Engineering, Egypt University of Calgary Department of Geomatics Calgary Canada University of Florence Department of Civil and Environmental Engineering, Italy Department of Electronics and Electrical Communications, Faculty of Engineering Tanta University, Tanta, Egypt Communications and Electronics Department Faculty of Electronic Engineering, Menoufia University: Menouf, Egypt


INTRODUCTION
Indoor localization used for providing users with location identification, navigation, and many other services to meet the positioning demand of different groups of people. Most researchers switch from outdoor to indoor positioning because it cannot be extended to practice due to poor GPS signals and the difficulty of indoor environments with many barriers. There are a large range of indoor location technologies, such as: visual, infrared, Wi-Fi, ultra wide band (UWB), bluetooth, inertial navigation, and magnetic field technologies, so it is widely agreed to use information from different sensors to enhance indoor positioning performance [1], [2].
Nowadays, Most of the buildings also have Wi-Fi access points APs, so the location of Wi-Fi is very beneficial to users. Wi-Fi technology has many benefits, such as: 1) Widely dispersed hot spots. Wi-Fi hotspots can be spread in a number of large or small buildings, making Wi-Fi placement ideal for many indoor environments; 2) Low access conditions; 3) High flexibility. WiFi signals are not impaired by nonline vision in a complex indoor setting [3].
But several external variables, such as: reflection, refraction, multi-path, shadow fading, scattering, and hindrances, are easily influenced. These interferences contribute to a significant deviation in pure Wi-Fi based localization in order to solve these obstructions by utilizing mobile terminals (phones and tablets) own built-in inertial sensors (magnetometer and accelerometer) that can be used to alter user trajectories. Since many sites have their own indoor maps online, the tracking service can deliver better results (more smoothly avoiding paths to the pass-through walls) using map information [4].
It is also clear that the precision of the position can be greatly improved by indoor maps and inertial sensors. There is however a lack of a sensible scheme to fuse map and sensor data with Wi-Fi indoor positioning. Due to the current sensor noise, the continuous use of inertial sensors creates a wide drift [5]. As such, it has attracted a great deal of interest in indoor positioning detection by using smartphones and magnetic fields because the magnetic field can be analogous in different locations. Magnetic data may not however be peerless inside a large indoor space since the single magnetic field pattern (magnetic fingerprint) consists of only a limited number of parameters and the fingerprint database needs to be updated periodically [6]- [8].
In this paper, the tracking algorithm is consisting of smartphone inertial sensors IMU given the possibility of obtaining magnetic field measurements at a much higher sample frequency with respect to Wi-Fi RSS on android phones and based on the pedestrian dead reckoning PDR approach integrated with external information, such as Wi-Fi and magnetic field fingerprinting, in order to offset the drift of assessment derived from the inertial sensors [9], [10].
The approach to pedestrian dead reckoning PDR is one of the most efficient in positioning assessment techniques and consists mainly of three phases: 1) Step detection; 2) Step length; and 3) Walking direction determination, so the PDR method is used in this paper to offer the simplicity of the path loss model and its higher reliability in open spaces. It is known as a camera because the fingerprinting training process is generally very long, in some works, so the path loss model RSS has been combined with the PDR method to establish different paths for the area of test [11], [12].
The operator moves freely on the area of test when collecting Wi-Fi RSS and magnetic field measurements, and then the operator's movements are monitored by the UWB positioning system during all data collection. In addition to covering the area of test as much as possible when collecting data from smartphone inertial sensors IMU on a spatially almost continuous trajectory [13]- [15]. Moreover, the trilateration approach is used in this paper to clarify the reference trajectory that considered to be the most renowned Wi-Fi-based positioning strategy, requiring distances between a mobile user and at least three access points APs to assess the location of a mobile user [16].
By means of the previous narration and the existence of all these challenges and difficulties that have been described in indoor positioning, some researchers used only a single sensor or Wi-Fi in positioning and used magnetic field vectors are not special in a wide area, but can be used to distinguish between different locations in a small area, so it is not a good option to estimate the user's position [17], [18]. Thus in this paper, a combination of Wi-Fi, RSS, magnetic field measurement, UWB devices and smartphone inertial sensors IMU was used for more precise indoor positioning, but the challenge was to locate a synchronize Wi-Fi access points APs to acquire fine-grained and extract timing details.
The main purpose of this experiment is the utilization of a low-price mobile mapping system consisting of smartphone inertial sensors IMU and UWB to provide a robust indoor positioning system and shortens the duration of the fingerprinting phase. Also, this can be used for simultaneous localization and mapping (SLAM). By combining Wi-Fi and motion calculation, to minimize the difference among the position and the indoor frame and deduce the map [19]- [21].

THE PROPOSED METHOD
In this experiment, the smartphone inertial sensors IMU have been tracked by the UWB devices, so the dynamic model can be expressed as: [̂( and ∆t the time interval among two sequential (UWB) transceiver devices. The extreme likelihood formula of the trilateration problem for the UWB devices to get the reference trajectory, where the altitude of the device is supposed to be approximately fixed in z ̅ direction can be expressed as the optimization equation: where [x(i) ŷ(i) z ̅] T is the estimated position corresponding to the i th UWB time sample, r j (i) is the measurement of the j th anchor at the i th (UWB) time sample, σ r is the uncertainty on UWB measurements (assumed for simplicity to be zero-mean and Gaussian), [x anch,j y anch,j z anch,j ] T is the position of the j th anchor and ( )is an indicator function: its value is one if the ( ) is available and zero if not.
In the future, the particle filter will be added to the proposed method to provide a more efficient and accurate estimated positioning on the area of test to match the estimated path to the real path with high probability. Table 1 demonstrates the algorithm of how to run the experiment steps to create an inexpensive and robust system that can be utilized in more accurate indoor localization. Table 1. General algorithm for the experimental procedures General algorithm for the experimental procedures 1-Collecting data by using Pozyx (UWB) devices and smartphone inertial sensors. 2-Preprocessing data then loading these processed data using Matlab. 3-Representing (2D) trajectory estimated with (UWB) and the 3 tracks in phase one. 4-Showing points of the first to third track in phase one (which is divided into 6 sub-tracks). 5-Clarifying Wi-Fi measurements and representing the relation between (RSS) vs time. 6-Investigating Magnetic Field measurements. 7-Creating the paths images for the Center of the corridor first track of phase one. 8-Creating the paths images for the Left of the corridor first track of phase one. 9-Creating the paths images for the Right of the corridor first track of phase one. 10-Separating all paths and constructing (RGB) histogram fo each path. 11-Dividing each path into equal distances (every five meters) then construct (RGB) histogram. 12-Using mutual information for matching between different paths to know accurate positioning.

RESEARCH METHOD
In this experiment, the test area consists of a couple of corridors on the 2 nd floor of a building of the University of Padua in Italy. The distance of such two corridors is approximately forty meters and twelve meters, respectively. Furthermore, the two corridors were equipped with eleven Pozyx UWB devices distributed over the test area and six Wi-Fi devices on the top of two corridors. Figure 1 displays the image of the corridor and it is map. 1328 front of the CIRGEO lab and then back. Three different tracks, repeated consecutively three times each, one in the middle of the corridor, one near to the wall, and one near to the windows. In each run, we stopped at least before coming back and before starting again for some seconds. Phase 2: three tracks (middle, close the wall, and close to the windows) stopping in correspond to each brown line on checkpoints. Phase 3: randomly walking on the corridor for 43 minutes: Wi-Fi-magnetic field fingerprinting on "checkpoints" in the middle of the corridor. So by fusing these real data sets leads to more accurate positioning. Figure 2(a, b) show the images of the eleven pozyx UWB devices were distributed in the bottom of the two corridors to provide accurate positioning on all the area of test compute a trajectory to be used as a reference. UWB devices often called anchors and rover devices named tags which based on the use of a network of devices fixed on invariant and known positions. Tag is connected with a smartphone to store the UWB measurements along the test area with their time-stamps. The distance between tags and anchors can be measured trilateration that can clearly be improved if the UWB is ranging error is properly modeled, i.e. Calibration of the UWB measurements [22], [23]. Furthermore, data collected simultaneously by smartphone inertial sensors IMU such as (The accelerometer is used to compute the step count and step length; while accelerometer, magnetometer and gyroscope are used to expect the heading change between two adjacent steps) which is tracked using pedestrian dead reckoning PDR approach [24]- [27].

RESULTS AND DISCUSSION
In this section, the performance analysis proposed of the indoor positioning system is evaluated by establishing the area of the test at the corridor in front of the CIRGEO lab on the second floor of a building of the University of Padua in Italy. And to interpret the results there is two ways graphical and statistical analysis. Therefore, the estimated positions with the UWB is showed in Figure 3(a, b) which the black circles are illustrated the reference trajectory with the UWB for the position of the UWB anchors, along with a schematic map for the area of the test, and the green solid line is shown the ground truth of a short trajectory collected during the experiment by using trilateration method. Figure 4 shows the experiment of three tracks in phase one which used as a learning dataset for fast fingerprinting, also used to present the 2D trajectory estimated with UWB. Figure 4(a) shows the estimated tracks by using UWB anchors in phase one of the experiment, Figure 4(b) shows the central track on the first track in phase one of the experiment which is divided into six sub-tracks, Figure 4(c) shows the left track on the second track in phase one of the experiment which is divided into six sub-tracks and Figure 4(d) shows the right track on the third track in phase one of the experiment which is divided into four sub-tracks.
In this experiment, there were several access points with different IDs in test area, but eighteen access points were used in phase one of the experiment. For instance, Figure 5 shows one of these access points, while Figure 5 From the previous data of RSS values of the APs, Figure 6, shows a slight change in the threedimensions of magnetic field behavior by using the magnetometer in IMU sensors. Which is estimated by walking from top to the bottom (center, left, right) of the corridor by using PDR approach that was equipped with IMU sensors and UWB transceivers, which should be effective for positioning purposes in phase one of the experiment. Figure 6(a, b) show the classifications of the magnetic field absolute value in the center, Figure 6(c, d) show the classifications of the absolute value of the magnetic field on the left, and Figure 6(e, f) clarify the classifications of the magnetic field absolute value on the right of the corridor that were collected frequently with standard fingerprinting.
From the previous data from UWB devices and smartphone inertial sensors, the image of the magnetic field in three directions (x, y, z) were created to show the different paths in the center, left and right of the corridor. So, each created image must be separated into two images, one of which contains the odd paths and the other contains the even paths for easy handling and clarification. Thus Figure 7 reported the comparison between the magnetic field images that were created in the test area, while Figure 7(a) the odd images of the center that contain paths (1,3,5) and their RGB histograms, Figure 7(b) the even image of the center that contain paths (2,4,6) and their RGB histograms, Figure 7(c) the odd image of the left that contain paths (7,9,11) and their RGB histograms, Figure 7(d) the even image of the left that contain paths (8,10,12) and their RGB histograms, Figure 7(e) the odd image of the right that contain paths (13,15) and their RGB histograms and Figure 7(f) the even image of the right that contain paths (14,16) and their RGB histograms.
After separation the magnetic field images in the test area, for instance, Figure 8 shows only five paths from all paths that have been created. So that one of them can be considered as a reference for others to match, which one is closer to the real path, by using the mutual information approach. So Figure 8(a) shows the path number one in the center of the corridor that is used as a reference, Figure 8 . The comparstion between the magnetic field images in the test area and their RGB histograms, (b) Center that contain paths (2,4,6), (c) Left that contain paths (7,9,11), (d) Left that contain paths (8,10,12), (e) Right that contain paths (13,15) Table 2 illustrates the utilization of mutual information to match the total length of various paths with reference paths. When the odd paths (1,3,5) for the center and UWB reference trajectory are used alternately as a reference with other paths. Therefore, path five within the center (C5) is more neared as possible to the real path. Table 3 illustrates the utilization of mutual information to match the primary ten meters of the entire length of various paths with reference paths. When the odd paths (1,3,5) for the center and UWB are used alternately as a reference with other paths. So the path five in the center (C5) is the closest to the real path.

CONCLUSION
This experiment is like a crowdsensing because UWB transceivers and smartphone inertial sensors IMU are used. The pedestrian dead reckoning PDR approach allowed collecting freely areal online data sets and determined the local features of the magnetic field for the area of test equipped with Wi-Fi devices. Also, the veracity of the experiment results is based on the frequent collection of data (the higher the better), so such experiment is performed three phases and each phase contains three tracks to achieve more accurate positioning. Moreover, the fingerprinting method of this experiment was used to exploit the device positions that calculated with the UWB trilateration method in order to allow for the collection of data with free movement. In addition, the training process was accelerated by taking advantage of UWB-based location estimates, thereby dynamically acquiring sensor measurements.
Finally, this experiment shows a low-priced mobile mapping system and a robust indoor positioning system are composed of the two categories of solutions "infrastructure-free" using PDR and "infrastructurebased" using Wi-Fi, smartphone inertial sensors IMU, and UWB transceivers are associated with a smartphone to be tracked. Also, the images of the magnetic field in three directions (x, y, z) are created for all paths in the area of test. Also, it allowed making comparison between these different paths using mutual information to match the closest path to the real one as previously known.