1. Introduction
As early as thousands of years ago, humans began successfully using the earth’s magnetic field to navigate [
1]. Even though only the combination of the compass needle and the magnetic declination map is used to determine the heading of the outdoor location, the method is simple and effective. In general, the spatial distribution of the Earth’s magnetic field is quite stable in an open environment. Due to the differences in the building and internal structures, we believe that this kind of information-rich three-dimensional vector magnetic field widely available in existing indoors can be used for indoor positioning, as shown in
Figure 1.
1.1. Motivation
Due to the multipath effect, the positioning and navigation of the inner area of a complex building is very challenging. Accurate enough indoor positioning technology is of great significance to the location of large shopping malls for automatic delivery. In 2016 Microsoft Indoor Localization Competition, it was reported that the fusion of geomagnetism and Wi-Fi was superior to many other solutions in positioning accuracy [
2]. In other words, the geomagnetic signal map is expected to exceed traditional Wi-Fi in to distinguishing fingerprints in different locations, location-based commodity information, and the collection of customer consumption habits [
3].
1.2. Problem Statement
Therefore, we hope to use the accelerometers, gyroscopes, etc. in mobile phones that are widely used for PDR positioning research and earth magnetic field positioning research without any hardware equipment deployment. Two positioning technologies and particle filter algorithms are combined to compensate for the lack of a single positioning technology and to optimize the accuracy of indoor positioning.
2. PDR Positioning Algorithm
Nowadays, most smart phones support a variety of sensors that can not only measure the mobile’s movement posture and some environmental conditions, but also collect high-precision data. Therefore, various sensors in a mobile phone can be used to perform pedestrian trajectory estimation positioning [
4]. This is the main principle of the PDR based on a smart phone is shown in
Figure 2. The basic idea is to use the accelerometer in the mobile phone to calculate the user’s step size after obtaining the target initial position and then use the direction sensor in the mobile phone to calculate the pedestrian’s moving direction, and finally estimate the pedestrian’s next position coordinate.
If the coordinates of the pending target at k are known (
xk,
yk), The step length is
lk, Direction angle is
θk, The calculation formula for the position coordinates of the target at the next moment (
xk+1,
yk+1) is:
According to the recursive formula, the two key factors in the entire calculation process are the walking step length and the direction angle.
3. Fusion Location Algorithm
The geomagnetic field positioning technology [
5] refers to a technical solution that uses the specificity of the geomagnetic field to acquire location information. Geomagnetic matching positioning is generally divided into two phases: establishing a geomagnetic reference map and online real-time positioning.
The establishment phase of the fingerprint map database is an offline training phase, in which the magnetic field information is measured by the magnetometer in the area to be located, and the geomagnetic signal is associated with its corresponding position coordinate.
The online positioning phase is to extract magnetic field characteristics based on the geomagnetic field information obtained during the off-line training phase. Then, compare the measured data with the data stored in the geomagnetic reference map and estimate the pedestrian location information using the corresponding matching algorithm (in this paper, the particle filter algorithm).
3.1. Particle Filter Algorithm
Particle filtering is a new filtering algorithm based on the Monte Carlo method [
6] and sequential importance sampling. It retains the advantages of the Monte Carlo method and does not have a nonlinear or non-Gaussian state space model. Any requirement applies to the solution of various complex problems; and unnecessary operations are avoided through the recursive process.
The key idea of particle filtering is to use a set of weighted random samples
to approximate the posterior density function. The formula is derived as follows
First establish a state space model, including
Observation equation:
where
yt represents observation signal,
xt representation status signal,
vt: Observation noise,
wt: State noise. The basic method follows “Resampling” technique [
7]:
- 1.
randomly generate a sample from the uniformly distributed [0, 1] interval ut~U [0, 1], t= 1, 2, …, n;
- 2.
Set the particle set (
) corresponding to the particle index
i satisfying Formula (5) as the
t-th particle (
) in the new particle set;
- 3.
Repeat n times to generate a new set of particles, each with a weight of 1/n.
3.2. GPDR (Geomagnetic + PDR Algorithm) Based on Particle Filter Algorithm Fusion
By introducing the basic principles of geomagnetic fingerprinting and PDR positioning, as well as the advantages and limitations of their own independent positioning, the superiority of fusion positioning is analyzed.
The positioning process of the entire system is: First, geomagnetic information in the active area is collected in the off-line phase to create a geomagnetic fingerprint library. In the online phase, the position coordinates of the target are roughly estimated by using the PDR positioning during the movement of the smart phone. Then use the PDR positioning results as the center to reduce the geomagnetic matching area.
The collected geomagnetic data and geomagnetic fingerprints are matched with the particle filter algorithm. The matching process is as follows:
Initialize.
Particle state transfer.
Weight calculation.
Location update. Updated pedestrian position (
xk,
yk), calculated as follows:
Resample. If
less than the preset threshold, enter the resampling phase. Get the final positioning result of the system.
4. Experimental Results and Analysis
The experimental design of this study is as follows: At the second floor of the college building, a rectangular path was selected using two different positioning methods. The experimenters collected sensor data along the path and obtained the path average positioning results after 20 experiments. PDR positioning requires a known initial position. This experiment assigns the initial position of the PDR to the true initial position. Then the PDR positioning information was used to determine the position coordinates of each step, and finally get the positioning results.
Figure 3 shows the pedestrian real path, the path estimated by the PDR method, and the GPDR estimated path based on the particle filter fusion algorithm.
When using the PDR alone to locate, there is a 79% probability of accuracy being better than 2 m; when geomagnetic fingerprint matching method is used alone for positioning, the error results are scattered; when using the fusion algorithm for positioning, 97% of the probability accuracy is better than 2 m, and 68% of the probability accuracy is less than 1 m. Therefore, the combined positioning method of PDR and geomagnetic matching technology can effectively improve the accuracy of the indoor positioning system.
5. Conclusions
This article studies the indoor positioning technology of smart phones, and focuses on the PDR algorithm and the geomagnetic fingerprint matching algorithm based on the particle filter algorithm. Finally, an indoor positioning and tracking algorithm GPDR based on geomagnetic and PDR fusion is proposed. The actual test results show that the fusion location algorithm proposed in this paper is 42% higher than the PDR algorithm. Compared to a single geomagnetic fingerprint matching algorithm, the positioning accuracy is improved by 57%.