Next Article in Journal
Smart Sticker Ultra-Low-Power Shock Detection in the Supply Chain
Next Article in Special Issue
Advances in Indoor Positioning and Indoor Navigation
Previous Article in Journal
Power Line Communication with Robust Timing and Carrier Recovery against Narrowband Interference for Smart Grid
Previous Article in Special Issue
Real-Time Map Matching with a Backtracking Particle Filter Using Geospatial Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Analysis of Magnetic Field Measurements for Indoor Positioning †

by
Guanglie Ouyang
* and
Karim Abed-Meraim
Laboratoire Pluridisciplinaire de Recherche en Ingénierie des Systèmes, Mécanique et Energétique, Université d’Orléans, 12 Rue de Blois, 45067 Orleans, France
*
Author to whom correspondence should be addressed.
This paper is an extended version of our conference paper: Ouyang, G.; Abed-Meraim, K. Analysis of Magnetic Field Measurements for Mobile Localisation. In Proceedings of the 2021 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Lloret de Mar, Spain, 29 November–2 December 2021; pp. 1–8, doi:10.1109/IPIN51156.2021.9662551.
Karim Abed-Meraim is a member of Institut Universitaire de France (IUF).
Sensors 2022, 22(11), 4014; https://doi.org/10.3390/s22114014
Submission received: 28 March 2022 / Revised: 16 May 2022 / Accepted: 23 May 2022 / Published: 25 May 2022
(This article belongs to the Special Issue Advances in Indoor Positioning and Indoor Navigation)

Abstract

:
Infrastructure-free magnetic fields are ubiquitous and have attracted tremendous interest in magnetic field-based indoor positioning. However, magnetic field-based indoor positioning applications face challenges such as low discernibility, heterogeneous devices, and interference from ferromagnetic materials. This paper first analyzes the statistical characteristics of magnetic field (MF) measurements from heterogeneous smartphones. It demonstrates that, in the absence of disturbances, the MF measurements in indoor environments follow a Gaussian distribution with temporal stability and spatial discernibility. It shows the fluctuations in magnetic field intensity caused by the rotation of a smartphone around the Z-axis. Secondly, it suggests that the RLOWESS method can be used to eliminate magnetic field anomalies, using magnetometer calibration to ensure consistent MF measurements in heterogeneous smartphones. Thirdly, it tests the magnetic field positioning performance of homogeneous and heterogeneous devices using different machine learning methods. Finally, it summarizes the feasibility/limitations of using only MF measurement for indoor positioning.

1. Introduction

The global indoor positioning market size is expected to grow at a Compound Annual Growth Rate of 22.5%, from USD 6.1 billion in 2020 to USD 17 billion by 2025 [1]. Advanced indoor positioning technologies that can obtain accurate location information and provide consumers with reliable location-based services and information are promising and attractive research areas. Location-based services include indoor navigation and tracking, marketing (shopping advertisements, proximity-based coupon sharing), entertainment (location-based social networking, location-based gaming), location-based information retrieval (e.g., pavilion tours, underground real-time information), and emergency and safety applications (e.g., emergency calls, automotive assistance) [2,3].
While GNSS is unable to meet indoor positioning requirements due to signal attenuation and obstacles, many alternative technologies and devices are used for indoor positioning, such as Wi-Fi [4], Bluetooth [5,6], ultrasound or sound [7,8], visible light [9,10], and magnetic field [11,12]. Table 1 describes the advantages and disadvantages of these positioning techniques in detail.
Magnetic-based positioning technology has attracted continued interest in academia [13,14] and industry [15,16] due to the popularity of smartphones, tablets, and personal digital agents (PDAs) with embedded magnetometers. As an emerging indoor positioning method, magnetic-based positioning uses the Earth and the local magnetic field disturbance to achieve the goal of indoor positioning, which has the advantage of safety, reliability, low cost, and being infrastructure-free.
However, magnetic field-based positioning still has many limitations. The magnetic field intensity of the Earth’s surface varies smoothly between 23 μT and 62 μT [25]. The magnetic field measurement has only three components, which leads to its low discernibility. Embedded magnetometers of heterogeneous smartphones are produced by different suppliers with different noise tolerances and accuracies, resulting in different MF measurements of heterogeneous smartphones. Seamlessly connecting all heterogeneous smartphone positioning solutions is therefore very challenging [26].
This paper analyzes the challenges and feasibility of magnetic-based positioning through systematic experiments. In conclusion, the main contributions of this paper are as follows:
  • A magnetic field acquisition system was developed using the Arduino Pro Mini and the LSM9DS1. The RLOWESS smoothing filter was proposed to eliminate the effects of noise, distortion, and outliers in the raw MF measurements.
  • Static tests, trajectory tests, and rotational tests were designed to investigate the magnetic characteristics of the heterogeneous smartphone.
  • Calibration tests of heterogeneous smartphones were carried out to demonstrate the potential of smartphone calibration in solving the heterogeneous device problem of MF.
  • Classification tests of heterogeneous smartphones were performed to show the feasibility of magnetic field positioning.
This paper is organized as follows. In Section 2, we present related works in the literature about MF characteristics. The magnetometer measurement model is introduced in Section 3. In Section 4, we discuss the statistical characteristics of the magnetic field and its temporal stability, compare the similarity of the magnetic field trajectories of heterogeneous smartphones, and present the variation of MF intensity with device orientation for the uncalibrated case. In Section 5, we compare the characteristics of ‘calibrated’ MF for heterogeneous smartphones. In Section 6, we use different machine learning methods to compare the positioning performance of homogeneous and heterogeneous smartphones. Finally, Section 7 summarizes the paper and highlights the challenges of magnetic field positioning.

2. Related Work

Many research works exist in the literature relative to indoor positioning and navigation using MF measurement.
MF characteristics have been thoroughly analyzed in works [26,27,28,29,30]. Li et al. [27] conducted experiments where indoor magnetic flow density was measured in different environments. The results show stable magnetic flow density measurements over a 24 h period. The experiments were repeated three months later, and no significant change was detected. It has been observed that the MF intensity of four different smartphone models differs due to the sensors’ different sensitivities [28]. This problem can be solved by normalization, but it will reduce the accuracy of positioning. Two smartphones were also placed in the exact location for long-time data collection to demonstrate that the MF intensity is time-stable. However, due to the smartphone battery capacity limitation, the data collection time will not exceed one day. Some anomalies brought about by the change in MF over time cannot be observed. Shu et al. [30] tested MF measurements on heterogeneous smartphones with different attitudes. They showed the uniqueness of local magnetic disturbance, the temporal stability of MF measurements, and the tolerance of MF measurements to moving objects. However, they highlight that heterogeneous devices have different MF measurements in the exact location. As MF measurements are three-dimensional and directional, the reference frame of the magnetometer is not easily aligned with the world frame, which leads to the use of only the magnitude of MF measurements in practice and makes it difficult to use three-dimensional MF measurements to improve discernibility. Ashraf et al. [26] provided a comprehensive analysis of the advantages and disadvantages of MF measurement. They highlighted the heterogeneity of smartphones, the height and behavior of users, and the low discernibility of MF measurements. Smartphone-based positioning is often more complex due to complex user behavior, e.g., user height, handheld smartphone position. The work in [29] studied MF intensity and direction distribution features. Using data from accelerometers and gyroscopes to obtain rotation matrices to transform the magnetic field coordinate system will increase the system’s complexity. To avoid the coordinate transformation, the work in [14] used the gradient of the MF values between two consecutive steps to avoid calibrating different smartphones. Since the magnetic pattern from heterogeneous smartphones is not the same, the work [31] proposed to use magnetic data from multiple smartphones to make the magnetic pattern. The authors propose an algorithm that identifies outliers in the MF data, removes them, and then normalizes the selected data to calculate the magnetic pattern. The effect of user height on the performance of magnetic-based positioning algorithms with two male and two female users was analyzed in the work [32]. The MF vector measured by the magnetometer is related to the orientation of the sensor and the position and orientation can be identified by an augmented MF vector with a directional variation [33]. As the MF vector can produce many different vectors in different attitudes, it can be trained by a transformed MF vector. The calibrated smartphone and magnetometer were found to have similar magnetic fingerprints [34]. GPS and Wi-Fi, as well as hand-held smartphones, do not significantly affect the measurement results. The peaks and drops of the MF signal can be used to identify certain areas. The effects of different metals and electronic objects on the MF were compared. MF measurements in indoor environments obviously vary more than those in outdoor environments. The quality of the positioning depends on the number of components used. When all three components are used, the performance of MF positioning is good. When using only the magnitude, or the vertical and horizontal components, the positioning performance decreases rapidly.
Indoor mapping is a prerequisite for indoor positioning systems. He et al. [30] use a site survey method based on compliance walks. This traditional map construction requires hiring experts to build indoor maps and update them regularly, which is an expensive and time-consuming method that cannot be applied to large-scale indoor coverage. In recent years, crowdsourcing, SLAM, as well as Gaussian processes have been proposed for constructing magnetic maps [35]. Crowdsourcing is an approach that uses crowd contributions to achieve complex tasks and is well suited for magnetic map construction [36]. For example, the works [37,38,39] used crowdsourcing to merge sensor data from multiple users on different paths to build a magnetic map. PFSurvey [40] uses accelerometer, gyroscope, and magnetometer data to estimate the trajectory of the surveyor and uses SLAM and particle filters to incorporate the floor plans of buildings, allowing for the rapid construction of magnetic field maps. PFSurvey’s data collection costs are low, yet it achieves similar accuracy to traditional site survey methods. Combining the physical properties of the magnetic field with a Gaussian process to model the magnetic field components allows for continuous updating of the estimates and the time variation of the magnetic field to build magnetic field maps quickly [41,42,43,44,45]
Magnetic field positioning methods can be divided into five categories: magnetic landmark, dynamic time warping, filtering method, SLAM, and neural network method.
Equipment with ferromagnetic materials (e.g., refrigerators, lifts, metal doors, etc.) can cause MF measurements to show prominent variations, and this magnetic disturbance can be used as a magnetic landmark to enhance indoor positioning and mapping [46,47,48], to detect indoor/outdoor environments [49], and to label the semantics of indoor environments [50].
Different walking speeds and sampling rates produce different numbers of magnetic samples within the same spatial coverage. Dynamic time warping (DTW) could align two magnetic field sequences with similar patterns but different amplitudes and times by compressing or stretching the time axis of one (or both) magnetic field sequences. Subbu et al. [51] use DTW to classify magnetic signatures collected from different corridors. By aligning unknown magnetic signatures with known signatures, the technique can obtain a close match between test and specific, temporally distinct magnetic signatures, thus providing correct corridor/location information. Through a similar method, Perez-Navarro et al. [52] showed that magnetic fields are a promising positioning mechanism when only the user’s zone needs to be located. Wang et al. [53] used DTW as a distance function to quantify the similarity between two signature vectors with different spatial sampling densities to match magnetic trajectories. The matched magnetic trajectories were used to calibrate the pedestrian dead reckoning (PDR) position, and the authors used online-collected magnetic trajectories to construct backward magnetic trajectories to increase the probability of improving the PDR position. By averaging the direction of travel for all steps between two successive detected turns, the authors reduced fluctuations in the direction of travel caused by user movement, sensor noise, local magnetic anomalies, and other electrical disturbances. In addition, 3DDTW [54], which extends the one-dimensional input signal into a two-dimensional signal, calculates the distance between the MF measurement and the magnetic fingerprinting, thus reducing the mismatch between the magnetic signature. CSMS [55] integrates channel state information (CSI) and magnetic field strength (MFS). Initial positions are first obtained by the M-KNN method. Then, DTW is applied to match the magnetic sequence during the motion for tracking. Finally, the k-nearest neighbor algorithm calculates the weights and narrows down the positioning range for fingerprint matching.
Machine learning methods such as K-NN [56], support vector machines (SVM) [57], naive Bayes [58], decision trees [59], and discriminant analysis [60] are widely used to extract the core features of a signal. The advantage of the machine learning approach is its ability to learn helpful information from input data with known or unknown statistics [61]. Galván-Tejada et al. [62] proposed a "signature" obtained by walking randomly around the room, using the spectrum, skewness, kurtosis, and variance of the magnetic signal as features. A genetic algorithm (GA) was used as the feature selection algorithm for data dimensionality reduction. However, the authors used only one-dimensional MF intensity and did not consider calibrating MF measurements of heterogeneous smartphones. Chuang et al. [11] designed a system with four magnetometers to evaluate the MF strength in each direction and used the nearest neighbor method to classify MF measurements with 12 components. The MF measurements of two different floors could be distinguished. The effects of smartphones, watches, laptops, elevators, and workbenches on the intensity of the MF were analyzed. Their system used chest-hung magnetometers instead of smartphones, which, in reality, do not have four magnetometers to measure the magnetic fingerprints in all directions.
Filter-based methods (e.g., Hidden Markov Model (HMM), Kalman filter, particle filter) have many indoor magnetic field positioning applications. Filter-based methods can fuse data from multiple sensors to provide higher positioning accuracy. For example, the work of Basmag [63] used a Backward Sequence Matching Algorithm (BSMA) to optimize the HMM and improve the low discriminability of the magnetic signal with the help of PDR. An HMM-based unsupervised learning algorithm was proposed in work [64] to compare the similarity of magnetic fingerprints with a lightweight algorithm. The extended Kalman filter could reduce the cumulative error of inertial sensors and improve orientation and positioning accuracy [65]. A reliability-augmented particle filter was mentioned in [66]; they used a dynamic step estimation algorithm and a heuristic particle resampling algorithm to reduce the error of motion estimation and improve the robustness of the particle filter. The work [67] employed the extended Kalman filter and particle filter to fuse information obtained from pedestrian dead reckoning and magnetic fingerprints, showing higher positioning performance than using the particle filter alone.
SLAM-based magnetic field positioning was recently presented in the work [47,68]. MagSLAM [68] used MF and human stride measurements without using a priori maps. Unique patterns in a smartphone’s accelerometer when climbing stairs, unusual magnetic disturbance at specific locations, and unique Wi-Fi access can serve as unique signatures in indoor environments. SemanticSLAM [47] adopted these unique signatures as landmarks and combined them with the pedestrian dead reckoning in the SLAM framework to reduce localization errors and convergence times. This approach is proven to be calibration-free. SLAM based on magnetic field measurements has two main challenges. Firstly, the construction of maps for large-scale indoor environments is challenging. Secondly, the continuous data exchange between the map and the positioning algorithm is energy-intensive [69].
Artificial neural networks (ANNs) are often used for classification and prediction, and researchers have recently applied ANNs to MF positioning. The MF maps are used to train the NN in the offline phase. The real-time MF measurements are fed into the trained NN to estimate its position in the online phase. The two main types of ANN-based magnetic field positioning are convolutional neural networks (CNN) and recurrent neural networks (RNN). The work in [32,70,71,72,73] uses CNNs to convert MF fingerprints into “image patterns” for classification, and the work in [74,75,76,77,78] uses RNNs to predict MF measurements as time series.
There are several limitations to the above studies. Firstly, they directly used the magnetic field data to predict the user’s current location, without pre-processing the magnetic field in conjunction with the magnetometer measurement model. Secondly, due to the battery capacity limitations of smartphones, magnetic field measurements cannot be collected continuously for long periods. Thirdly, although several research works have given solutions for heterogeneous smartphones, it is not clear whether the calibration parameters will change over time and whether they need to be calibrated at every point in space. Fourthly, uncalibrated magnetic field measurement varies with the orientation of the device. Magnetic field measurements in a specific direction can only be matched to the magnetic field fingerprint in that specific direction. Finally, the above studies used homogeneous smartphones and did not use fingerprint databases from heterogeneous smartphones when testing the positioning algorithms. This study aims to provide an exhaustive analysis of magnetic field-based indoor positioning and experimentally explore the feasibility and challenges of magnetic field-based indoor positioning.

3. Magnetometer Measurement Model

The magnetometer measures the MF intensity along the x, y, and z axis of the sensor. Magnetometers are essential auxiliary sensors for attitude estimation in low-cost, high-performance inertial navigation systems. The fusion of magnetometer and inertial sensor can obtain accurate 3D attitude estimation [79,80]. The accuracy of 3D attitude estimation is closely related to the calibration of sensor measurements [81]. Magnetometers are more sensitive to environmental changes than inertial sensors and require frequent recalibration [82]. Generally, there are two main types of error sources in magnetometers. One type is the non-orthogonality, scale factor, and bias caused by technical limitations in the sensor’s manufacturing, installation, and materials. The other is the hard and soft iron effect caused by ferromagnets around the sensor [83].
Complete three-axis magnetometer measurements can be expressed as:
m b = SM A si R bn m n + b h i + b so + ε .
In Equation (1), m n R 3 × 1 represents the Earth’s geomagnetic field vector in navigation frame n aligned with the Earth’s gravity. m b R 3 × 1 represents the measured magnetic vector in the sensor body frame b. R bn R 3 × 3 represents the rotation matrix that transforms the magnetic vector from the navigation frame n to the sensor body frame b. The scale factor S R 3 × 3 represents the difference in sensitivity of the three axes. The matrix M R 3 × 3 indicates the misalignment errors of sensors. The vector b so R 3 × 1 represents the bias in sensors. The matrix A si R 3 × 3 represents the soft iron distortion. The vector b hi R 3 × 3 represents the hard iron bias. ε represents an i.i.d Gaussian noise from N 0 , σ ε 2 I . Each of these error terms will be discussed in detail below.
Suppose that ε x R 3 × 1 , ε y R 3 × 1 , and ε z R 3 × 1 represent the skew error of sensors’ x, y, and z axis in the sensor frame, respectively. M can be modeled as:
M = ε x ε y ε z 1 .
The scale factor errors are modeled as
S = diag s x s y s z ,
where s x , s y , and s z denote the scale factor of the sensors’ x, y, and z axis, respectively.
The sensor bias is modeled as
b so = b so z b so y b so z ,
where so x , so y , and so z denote the sensor bias of the sensors’ x, y, and z axis.
In an outdoor environment, the local geomagnetic field is equal to the local Earth’s MF. Its horizontal component points to the magnetic north pole of the Earth [84]. In the absence of any magnetic interference, by rotating the magnetometer in all possible directions, the MF measurements are located on a sphere with a radius equal to the MF intensity.
However, metals such as nickel and iron could cause the soft iron effect, which distorts the sphere into an ellipsoid, as shown on the plot of Figure 1a. This distortion is denoted by A si R 3 × 3 . The hard iron effect is denoted b hi R 3 × 3 and is produced by materials that exhibit a constant additional field to the Earth’s MF, shown in Figure 1b. This distortion shifts the origin of the ideal magnetic measurement sphere. Hence, with the hard iron and soft iron effect, the magnetometer measurement model can be written as:
m b = A si R bn m n + b hi .
It is not necessary to identify all the components of Equation (1). Expanding Equation (1), the scale factor, misalignment, and soft iron distortion can be combined into a distortion matrix A R 3 × 3 , and the hard iron effect and sensor bias can be formed into an offset vector b R 3 × 1 .
A = S M A si ,
b = S M b hi + b so .
Hence, the magnetometer measurement model can be expressed as:
m b = A R bn m n + b + ε .
In the following section, we will use the magnetometer measurement model to analyze the MF signal, the statistical characteristics of a heterogeneous device, and the influence of the distortion matrix A and the offset b .

4. Analysis of the MF Characterisctics

In this section, we analyze the MF measurement characteristics of a heterogeneous smartphone through static, trajectory, and rotation tests. Several heterogeneous smartphones were used in the experiments. Table 2 describes the system version, the sensor vendors, the model, and the characteristics of the magnetometer. Android sensor information is available through the Android API, while iPhone sensor information is not available directly from the iOS API but only through publicly available information. The Huawei P9, Redmi Note 10 Pro, and Samsung S9 all use different magnetometer models from AKM (Asahi Kasei Microdevices), and Bluebird uses magnetometers from MEMSIC Inc. As the iPhone has no interface to obtain detailed information about the sensors [85,86], we could not find information on the iPhone sensor’s manufacturer, model, range, and resolution. The heterogeneity of smartphones is caused by the different characteristics of magnetometers, making it very difficult to design a positioning system that can seamlessly connect various smartphones [26,32].
This paper investigates the MF measurements of the Android and iOS devices. All smartphones used MATLAB Mobile software to collect MF measurements to prevent the effects of software differences. In Section 4.1, we study the statistical characteristics and Gaussianity of heterogeneous smartphones. In Section 4.2, we compare the MF trajectories of heterogeneous smartphones, and in Section 4.3, we test the MF characteristics of smartphones when they are rotated. In Section 4.4, we design a magnetic field acquisition device using the Arduino Pro Mini and the LSM9DS1 and analyze the original magnetometer’s statistical characteristics.

4.1. Statistical Tests with Heterogeneous Smartphones

Ferromagnetic materials in modern buildings, such as steel casing, electrical equipment, vending machines, etc., can cause local magnetic disturbance. Magnetic-based indoor positioning requires that the magnetic field measurement remain stable over a relatively long time. It is important to design a positioning method that can seamlessly integrate with the MF measurements of various smartphones [26]. Hence, we first investigate the indoor magnetic field’s temporal stability, Gaussianity, and heterogeneity.
Three heterogeneous smartphones (iPhone Xs Max, Huawei P9, Bluebird) were used to investigate the MF’s statistical characteristics with heterogeneous smartphones.
The three smartphones were placed at a specific point on a wooden table without ferromagnetic material, and the orientation was kept consistent, with a sampling frequency of 100 Hz during a period of 35 min. We found that although the experiment was set at a sampling frequency of 100 Hz, the heterogeneous smartphones could not always reach the set frequency. The iPhone Xs Max sampled at 100 Hz, the Huawei P9 at 103 Hz, and the Bluebird could only reach 80 Hz. The sampling frequency that we can achieve is related to the processor performance of the smartphone.
Figure 2a,c,e demonstrate the temporal stability of the MF measurements of heterogeneous smartphones at a specific location. The MF reading of the iPhone Xs Max and Huawei P9 is quite stable (at least, during a short observation time period), while the MF measurements of the Bluebird are corrupted by outliers and strongly biased compared to the other two groups. From Figure 2b,d, we can see that the MF magnitude follows approximately a normal distribution. However, Figure 2f shows that Bluebird’s MF measurements do not follow a normal distribution due to the effect of outliers.
Table 3 summarizes the mean values, standard deviations, kurtosis, and skewness of MF intensity with heterogeneous smartphones. From the column of standard deviation, the standard deviation of the iPhone Xs Max is relatively low. Huawei’s standard deviation is moderate, while Bluebird’s standard deviation is the largest and the measurement uncertainty is the highest. Usually, the smaller the standard deviation of the smartphone, the smaller the fluctuation of the MF signal, the higher the certainty of MF measurement, and the better the positioning performance.
From the column of mean values, the MF intensity of the iPhone and Huawei are at the same level, while Bluebird’s measurements are biased, well outside of the geomagnetic range of 23 μT to 62 μT [87]. The magnetometer calibration algorithm based on ellipsoidal fitting can correct the measurement distortions. The iPhone’s kurtosis and skewness show a right-skewed normal distribution. At the same time, the Bluebird’s measurements have many outliers, resulting in much larger kurtosis and skewness than those of the iPhone and Huawei. Based on the above analysis, we found that different smartphone manufacturers have different embedded magnetometer models, resulting in different MF measurements. Moreover, differences in processor performance make it difficult to achieve consistent sampling frequencies across heterogeneous smartphones.

4.2. Trajectory Test with Heterogeneous Smartphone

From Section 4.1, we have already confirmed that MF does not change over a short time period. In this section, we study the spatial distribution variability and temporal stability of heterogeneous smartphones’ MF measurement. Users walked along the same path with heterogeneous smartphones to collect data at a sampling frequency of 100 Hz.
The experiment took place on the third floor of Polytech Galilee (Orléans, France), and the tested heterogeneous smartphones included the iPhone Xs Max, Samsung S9, Redmi Note 10 Pro, and Huawei P9.
As shown in Figure 3, the trajectories of the heterogeneous smartphones tested at different dates largely overlap, demonstrating that the indoor MF is stable over time without significant changes to the indoor infrastructure. The magnetic fingerprint, including local indoor disturbances, is stable over time without changes in indoor infrastructure. Previous works [11,26,27,30,88,89] have preliminarily explored these properties of MFs. Figure 4a shows that the heterogeneous smartphones have similar MF measurement trajectories under the same path.
Disturbances caused by building materials and electrical appliances lead to certain anomalies in the indoor MF. The pattern of disturbances varies from place to place, making the indoor MF spatially unique. Figure 4b shows that the smartphone has different MF measurements under different paths, demonstrating the MF’s spatial uniqueness.

4.3. Rotation Test

Magnetometers are often fused with inertial sensors for pose estimation. Accurate MF measurements are essential for determining the user’s heading and orientation. The construction of an MF map would be a tedious task if the MF measurement was dependent on orientation. MF measurements in various orientations at a specific point have been investigated.
A smartphone was placed on a rotatable platform, as shown in Figure 5; the smartphone frame was aligned with the platform frame, and the platform was rotated around the z axis of the smartphone. The MF database was collected at a sampling frequency of 100 Hz for 25 s.
MF positioning is based on the stability and uniqueness of the MF signature. In the positioning phase, smartphone measurement should match the MF database. The location with the shortest distance has the highest probability. However, as seen in Figure 6a, the x, y component and magnitude of MF also change periodically when the smartphone rotates periodically; only the z components remain relatively stable. Instead of using MF magnitude as a signature, it is better to use the z component as a fingerprint.
The x and y axis of the MF can represent the variation in the magnetic direction. Figure 6b shows that the magnetic orientation varies between 180 and 180 , where the magnetic direction is calculated as follows:
O r i e n t a t i o n = arctan m y m x .
The ideal magnetic direction should be a standard sine curve, but the curve shown in Figure 6b is clearly not a sine curve and does not accurately represent the magnetic direction.
Figure 7a shows the MF measurements on the x, y, and z axis, where the MF measurements are approximately circular, illustrating that the soft iron effect can be ignored. Figure 7b shows the projection of the MF measurement on the xy coordinate; the actual center of the circle is at ( 4.65 , 4.01 ) instead of at the ideal origin ( 0 , 0 ) , which indicates a hard iron effect of the MF measurement. Therefore, calibration of the smartphone is necessary. Figure 7c shows the projection of the MF measurement in the xz coordinate. The results show that the magnetic field does not change on the z axis, and the offset originates from the x and y axis.

4.4. Static Tests with Magnetometer

The previous analysis used a commercial smartphone with already pre-processed MF measurements by the manufacturer. An MF acquisition device, shown in Figure 8, was designed with the Arduino Pro Mini and 9-DoF LSM9DS1 [90] to study the unprocessed MF measurements; the software was developed using the open-source code available on the Arduino website [91]. Six designed devices (referred to as D1, D2, D3, D4, D5, and D6) were placed in a warehouse of width 45.69 m and height 49.5 m in the city of Tour, France. They continuously collected magnetic measurements in stationary mode for 9 days until the battery ran out.
The robust locally weighted scatterplot smoothing (RLOWESS) method has been applied for outlier rejection [92]. Indeed, robust estimation methods generally involve the detection and mitigation of outliers, e.g., [31]. In our context, this pre-processing step is to avoid the large positioning bias that might be induced by such outliers. The robust weightings, multiplied with the neighborhood weight, are used for re-estimating a linear regression function:
i w i η i r i 2 ,
where w i is a neighborhood weight expressed as:
w i = 1 x x i ˘ q ( x ) 3 3 ,
x is the predictor, x i is the nearest neighbor of x as defined by the window slide, and ˘ q ( x ) is the distance of the qth farthest x i from x within the window slide.
η i is the robust weight expressed as a bisquare function:
η i = 1 r i / 6 h 2 2 , | r i | < 6 h 0 , | r i | 6 h
where r i is the residual of the response value y and the predicted response value y ^ , and h is the median of the residuals
h = median ( | r i | ) = median y i y ^ i .
In the following, we use the RLOWESS algorithm to smooth the MF measurements. Figure 9a shows that magnetic fingerprinting is not stable before filtering. There will be a sudden jitter without a calibration step.
Figure 9b provides the histogram of magnetic measurements before processing, We can see that there exist spurious values due to the jitters for D1, D3, D5, and D6, i.e., D1 has some values of 0 to 15 μT, while D5 has some values in the range of 30 to 50 μT. A similar situation has been found for the Bluebird, where we believe that smartphone manufacturers have different standards for the calibration of magnetometers, resulting in different MF measurements. In this experiment, we used the RLOWESS method mentioned above to filter out outliers of MF measurement. The filtering result is shown in Figure 9c, and the histogram of filtered MF is given in Figure 9d. As we can see, the magnitude of MF intensities is different at different positions. The six quasi-normal distributions could be distinguished by visual inspection in this particular case. We can draw the conclusion from Table 4 that MF is stable for the considered period of time and subject to quasi-normal distribution. However, the conditioning of the sensors (or pre-filtering of their outputs) is necessary since all measurements are affected by outliers, which results in very high-level variance. The higher the variance, the worse the performance for positioning.

5. Calibration of Magnetic Field

Magnetometer calibration of a smartphone is actually the estimation of the calibration parameters A and b in Equation (8). In this paper, we use the batch magnetometer calibration method, where the smartphone is rotated along each direction to obtain magnetic field data, using the entire set of magnetic field measurements to estimate the unknown calibration parameters [93]. Supposing that magnetometer measurements are constant, and the local MF measurements are attitude-independent, to estimate the magnetometer error term, we can construct a cost function from the difference between the magnetometer measurement model and the true MF measurements [94]. Here, we present a calibration test with a different smartphone, and the calibration algorithm uses the work in [95]. We calculate the soft iron A and hard iron b of the smartphone at a given point and a given date. We tested these transformations (i.e., A and b ) over a period of time to see if periodic re-calibration is necessary. Moreover, we tested the same calibration parameters at different points to see if they depend on the ambient location or only on the considered smartphone. To accomplish these goals, three smartphones (iPhone Xs Max, Huawei P9, Bluebird) have been used to continuously collect MF data at 10 points from February to June 2020 in 2 buildings; point 1 to point 7 are in building 1; point 8 to point 10 are in building 2. Smartphones were rotated around X, Y, Z, respectively, for 120 s for the aim of calibration.
Figure 10 shows the calibration results at P1 on 7 February 2022, where the MF measurements of these smartphones are found to be spherical. This means that their distortion matrix approximates the identity matrix and the bias is negligible. Meanwhile, there is a significant bias for Bluebird (shown in Figure 10c), which needs to be eliminated.
We calculated calibration parameters using MF measurements of P1 from three smartphones on 7 February 2020. The obtained calibration parameters were applied to Equation (14) to obtain true MF measurements at different times.
m n = R nb A 1 m b b ε .
The rotation matrix and bias obtained at point P1 on the first day were used to calibrate all other data to demonstrate that the rotation matrix and bias of the MF are independent of time and space and only relate to the internal parameters of the smartphone. Figure 11a,c,e show the original MF magnitude of the iPhone Xs Max, Huawei P9, and Bluebird. Figure 11b,d,f show the calibrated MF magnitude of the iPhone Xs Max, Huawei P9, and Bluebird, respectively.
The X axis represents the 10 points where the magnetic field was collected. When we connect the MF intensity of the 10 points, we find that the six datasets collected over five months overlap, proving the magnetic field’s temporal stability. MF intensity is different for P1 to P10, indicating that the MF measurement has spatial discernibility.
As shown in Figure 11c, Huawei’s MF measurements from P1 to P7 on 14 February 2020 are abnormal (blue line), but the rest of the time, the MF measurements follow the same trend as the iPhone Xs Max.
Figure 11e shows that the Bluebird’s original MF measurements do not overlap. The MF intensity varies between 80 and 110 μTesla, much greater than the iPhone Xs Max and Huawei P9. However, the calibrated MF intensity (shown in Figure 11f) is essentially the same as the MF intensity of the iPhone Xs Max and Huawei P9, suggesting that magnetometer calibration can solve the problem of smartphone heterogeneity.
Figure 12a compares the MF intensity of the three smartphones from February to June. The MF intensities of the iPhone and Huawei are stable and overlap. Assuming that the iPhone is used to construct an MF map, Huawei can also use this MF map for positioning. However, the MF intensity of Bluebird is significantly different from the other two devices. The difference in the MF measurements of the heterogeneous smartphone is a significant challenge for MF positioning.
Figure 12b compares the calibrated magnitude of the P2 and P10 from February 2020 to June 2020. The calibrated MF intensity varies within a relatively stable range over five months, indicating that the calibration transformation is “stable” over time and over space. Heterogeneous smartphones have similar MF measurements at the same points. One can conclude that the MF calibration parameters are determined by the characteristics of the smartphone, and not by the environment. In addition, magnetometer calibration can solve the problem of heterogeneous equipment for MF.
Based on the above analysis, the original and calibrated magnitude of MF at each point remains stable over five months, while the surrounding environment remains unchanged. Different points have different mean values of MF intensity, which is an advantage for magnetic fingerprinting positioning. For the Huawei P9 and iPhone Xs, they have already been initially calibrated by the smartphone manufacturer. The iPhone Xs Max has the slightest standard deviation in MF intensity of the three smartphones. On 14 February 2020, the Huawei P9 had anomalies at P1, P3, P4, P5, P6, and P7. The standard deviation of these points is so significant that calibrating these values using the rotation matrix and bias from P1 on the first day would have resulted in substantial errors. The original magnitude of the Bluebird is not at the same level as the iPhone Xs Max and Huawei P9. However, the calibrated magnitude is at the same level for all three smartphones.

6. Classification Test with Calibration

The rapid development of artificial intelligence has attracted the attention of researchers who are applying machine learning methods to indoor positioning technology to address the limitations of traditional positioning techniques. The most important advantage of the machine learning approach is its ability to learn helpful information from input data with known or unknown statistics [61].
Classifier algorithms such as k-NN [56], support vector machines (SVM) [57], naive Bayes [58], decision trees [59], and discriminant analysis [60] are widely used to extract the core features of a signal in machine-learning-based positioning.
Positioning methods often need to consider positioning accuracy and computational complexity. Obtaining high-dimensional data through feature engineering can improve accuracy, but it also brings higher computational complexity. Dimensionality reduction techniques such as principal component analysis (PCA) [96] and singular value decomposition (SVD) [97] can transform high-dimensional features into low-dimensional features, significantly reducing the storage space and computational complexity of magnetic fingerprint-based positioning.
The architecture of a magnetic-based positioning system is shown in Figure 13. The system consists of two phases: online and offline [24]. First, raw magnetic data are collected at a reference location using a smartphone. Then, during the data pre-processing step, low-pass filters, smoothing filters, and calibration algorithms are applied to remove noise and bias from the smartphone’s MF measurements. Thirdly, the pre-processed data construct a fingerprinting database corresponding to each location. The fingerprinting database is trained using machine learning methods (e.g., kNN, support vector machines, decision trees, naive Bayes, discriminant analysis) to obtain predictive models. Finally, a prediction model is used to predict the test data’s position. We will focus on fuzzy kNN, support vector machines, decision trees, naive Bayes, and discriminant analysis in the following.
This experiment used three different smartphone models (iPhone Xs Max, Huawei P9, Bluebird) to test the location discernibility of local magnetic fingerprinting. Among them, Bluebird is an industrial custom smartphone for location-based services.
The test area is a corridor in the 3rd floor of Polytech Galilée, University of Orléans (shown in Figure 14); zones 1, 2, and 3 each contain 10 sampling points. Firstly, the user stands for 5 s at each point, holding a smartphone to capture a magnetic fingerprint database of 30 points with 100 Hz sampling frequency. Next, the user stands for 1 s at each point to capture test data and calculates the average of these 100 samples; this process was repeated five times to obtain 5 test datasets. Finally, we obtained n = 15,000 samples of training data X t r a i n i n g = x 1 , x 2 x n x i R n × 3 , and k = 150 samples of test data X t e s t = x 1 , x 2 x k x j R k × 3 , respectively. Each sample has a label belonging to class y = 1 , 2 30 .
In the experiments, the test and training sets were collected in the same direction (along the corridor direction). The sampling interval between two successive points is set to 1.5 m. The height of a smartphone is set at 1.05 m distance from the ground.

6.1. Data Pre-Processing

In Section 5, we have already discussed the significance of MF calibration. Hence, in this experiment, the raw MF signal is pre-processed before classification tests. More precisely, the MF measurements are calibrated according to Equation (14), where the rotation matrix R n b comes from the TRIAD algorithm mentioned in [98]. MF measurement on the smartphone’s frame is transformed into the horizontal (denoted as m h ) and vertical (denoted as m v ) components [27]. After this transformation, the horizontal and vertical components are “ideally” independent of the user’s direction. Thus, the features of the training and test data can be expressed as:
x i = m h , m v , m a g n i t u d e R 3 ,
The RLOWESS smoothing filter mentioned in Section 4.4 is also used to eliminate anomalies in the smartphone’s MF measurements.

6.2. Machine Learning Methods Used for Classification

Magnetic field positioning can be seen as a classification problem. Training data with labels are used to train the classifier in the training phase. Afterward, the new data are fed into the classifier for classification. The machine learning methods used for the tests will be briefly described here.
Fuzzyk-nearest neighbor: The fuzzy k-nearest neighbor algorithm [99] is a well-known algorithm for classification. The theory of fuzzy sets was introduced into the k-nearest neighbor technique to develop a fuzzy version of this algorithm called fuzzy k-nearest neighbor. Not only does the fuzzy algorithm have the advantage of a lower error rate, but the resulting membership also provides a confidence level in the classification. Fuzzy k-nearest neighbor was shown to perform well compared to other more complex classification algorithms. The principle of the algorithm is to assign membership as a function of the Euclidean distance vector from the basic k-nearest neighbor algorithm and memberships in the possible classes.
Consider m feature samples X = x 1 , x 2 x n x i R m collected from n points in the test area (namely N labeled class). The second magnetic test set contains m feature samples y = y 1 , y 2 y k y j R m from l points, and we compute the metric
μ i ( y ) = j = 1 K μ i j 1 / y x j 2 / ( m 1 ) j = 1 K 1 / y x j 2 / ( m 1 ) .
where j = 1 , 2 , K , with K being the number of nearest neighbors; i = 1 , 2 , n , with n being the number of labeled classes. μ i ( y ) denotes the specified membership of vector y, and μ i j represents the membership of class i of the j-th vector for the labeled sample set. The fuzzy parameter m is used to determine the weights of the distances; here, we set m = 2 .
Decision tree: A decision tree is a non-parametric supervised learning technique consisting of multiple decision rules, all of which are derived from data features. In a decision tree, we call the whole sample the root node, and the process of dividing a node into two or more sub-nodes is called splitting. When a sub-node splits into more sub-nodes, it is called a decision node. Nodes that do not split are called leaves. The process of deleting the sub-nodes of a decision node is called pruning. The decision tree algorithm splits the training set (root node) into subsets, recursively splitting until no pure sub-nodes (leaf nodes) are obtained. The decision tree algorithm requires optimal attributes and thresholds that maximize the splitting criteria (e.g., CART Tree), and the resulting set of splits is optimal. Commonly used decision tree models such as the CART algorithm use Gini’s impurity index, the ID3 algorithm uses Information Gain, and the C4.5 algorithm uses the Gain Ratio [59].
Naive Bayes: The naive Bayes classifier is based on Bayes’ theorem. Suppose that m feature samples X = x 1 , x 2 x n x i R m belong to k class y = y 1 , y 2 y k . According to Bayes’ rule, P y i x can be expressed as
P y i x = P x y i · P y i P ( x ) ,
where P y i and P x are known; to estimate the location, we need to find the corresponding location y i that maximizes P x y i . Since the magnetic values obey a Gaussian distribution, i.e., P x y i N ( μ , σ 2 ) , μ and σ are derived from the training set [58].
Discriminant analysis: Discriminant analysis methods are well known for learning discriminative feature transformations and can be easily extended to multiple-class cases [100]. Suppose that we have m feature samples X = x 1 , x 2 x n x i R m belonging to k class y = y 1 , y 2 y k . The within-class scatter matrix is given as:
Σ ^ w = i = 1 n x y i x μ i x μ i ,
where μ i = 1 l i x y i x and l i is the number of samples in y i . The between-class scatter matrix equation is defined as
Σ ^ b = i = 1 n l i μ i μ ¯ μ i μ ¯ ,
where l i is the number of training samples for each class, μ i is the mean for each class, and μ ¯ is the total mean vector given by μ ¯ = 1 l i = 1 n l i μ i . The Fisher criterion suggests that the linear transformation w maximizes the ratio of the determinant of the between-class scatter matrix of the projected samples to the within-class scatter matrix of the projected samples [60]
J ( w ) = w Σ ^ b w w Σ ^ w w .
The transformation w can be obtained by solving the generalized eigenvalue problem [100]:
Σ ^ b w = λ Σ ^ w w
Discriminant analysis has also its limitations; it assumes a unimodal Gaussian likelihood, and for non-Gaussian distributions, discriminant analysis predictions will not preserve any complex structure of the data. It fails when the discriminant information is not in the mean but in the variance of the data.
Support vector machine: Support vector machine classifies data by finding the best hyperplane, which is the hyperplane with the maximum distance between two classes. Consider m feature samples X = x 1 , x 2 x n x i R m belonging to k labels y = y 1 , y 2 y k . The i-th SVM is trained using all examples with positive labels in the i-th class and all other examples with negative labels, and the i-th SVM is formulated as follows:
min w i , b i , ξ i 1 2 w i w i + C j = 1 l ξ j i w i w i f x j + b i 1 ξ j i , if y j = i w i f x j + b i 1 + ξ j i , if y j i ξ j i 0 , j = 1 , , l
where the training data x i are mapped to a higher-dimensional space by a function f, w R m is a vector representing the direction of the separated hyperplane, b R is a constant representing the position of the hyperplane, C is the penalty parameter that defines the trade-off between large separation regions and misclassification errors, and ξ j i is a slack variable that allows some samples to be on the wrong side of the separation hyperplane [101,102,103]. According to Equation (22), we can obtain the decision functions
w 1 f ( x ) + b 1 w k f ( x ) + b k .
where x belongs to the class with the largest value of the decision function.
class of x arg max i = 1 , , k w i T f ( x ) + b i

6.3. Classification Result

The test zones are shown as three rectangles in Figure 14, with 10 test points in zones 1, 2, and 3, respectively. The green area is the elevator, which is a source of magnetic interference. Figure 15 shows the “calibrated” MF intensity at 10 points in zone two as an illustrative example to visually analyze the MF magnitude fingerprints in this zone. The Huawei device has a more significant variance in the MF intensity than the other two smartphones, with more overlap between the signals. Bluebird’s database shows that there is an overlap between P12, P15 and P20, P18, and P19. The iPhone has a slight overlap between P12 and P13.
As mentioned above, the training dataset sampling time for this experiment is 5 s, so there are 500 training samples. More training data can better train the prediction model. The test data are the average of the test dataset samples (100 samples in total).
The accuracy is calculated according to Equation (24),
Accuracy = N u m b e r o f a l l c o r r e c t l y l a b e l e d p o i n t s N u m b e r o f a l l p o i n t s .
First, we test the training and test sets from the same smartphone separately, and the results are shown in Table 5. The positioning accuracies of the iPhone Xs Max and Bluebird are relatively similar (close to 80 or above), basically meeting the needs of essential indoor positioning. In contrast, the positioning accuracy of the Huawei P9 is significantly lower than the other two smartphones. Figure 16 shows the confusion matrix for the three smartphones using the KNN method, blue indicates correctly classified points, other colors indicate incorrectly classified points.Huawei P9 performs better in zone 2 (landmark 11 to landmark 20) and does not have high positioning accuracy in zones 1 and 3. The elevator in the green area of Figure 14 is a source of magnetic field interference, making this area even more special. The results from Huawei P9 show that the interference source improves the positioning performance (i.e., it enhances the differences between the MF features). The variances of the MF measurements for the iPhone Xs Max, Bluebird, and Huawei P9 are 0.04 μT, 0.12 μT, and 0.21 μT, respectively. As the intensity of the magnetic field varies smoothly between 23 μTesla and 62 μTesla [87], the larger the variance, the more likely it is to overlap with other signals within a limited variation interval, which degrades the positioning performance. Due to the significant variance of the MF measurement, Huawei’s positioning accuracy is lower than the other two smartphones.
Next, we use the iPhone Xs Max for the training set to obtain the prediction model and test the other two smartphones separately. Table 6 illustrates the positioning accuracy. We can see that the positioning accuracy decreases when the magnetic fingerprinting database and the test data are inconsistent compared to Table 5. We already saw earlier that the Bluebird’s MF measurement is significantly different from the other two smartphones. Nonetheless, using the calibrated Bluebird’s MF measurement, we can also achieve accuracy of approximately 50%, which means that we have the opportunity to use the iPhone to create a magnetic field fingerprint database that other smartphones can use for positioning. We can also see that KNN, discriminant analysis, and SVM have better positioning accuracy than decision tree and naive Bayes in this experiment.

7. Conclusions

With the widespread use of smartphones, ubiquitous magnetic fields are attracting researchers’ interest. The use of smartphones to measure magnetic fields for indoor positioning has significant advantages: infrastructure-free, temporal stability, and spatial uniqueness.
However, there are also significant challenges highlighted by our study:
  • Firstly, the use of MF data requires the processing of device heterogeneity. The magnetometers with different specifications used by smartphone manufacturers result in different MF measurements. Hence, MF fingerprinting would require the use of smartphones/magnetometers which have similar characteristics to ensure the efficiency of such a positioning approach.
  • Data pre-processing is necessary in order to exploit the MF data. This includes filtering out the outliers that affect the magnetometer measurements (in this work, we propose the RLOWESS algorithm to smooth the MF measurements). It also includes the calibration of the magnetometer, which is necessary to eliminate soft and hard iron influences.
  • The magnetic signatures of heterogeneous smartphones on the same path have the same pattern but do not overlap. As the X and Y axes of the magnetic field are direction-dependent, the MF intensity of the smartphone fluctuates as it rotates around the Z axis, which is challenging for magnetic field map construction.
  • Calibration tests were carried out with different smartphones in specific locations at given dates. It was found that the calibration parameters of the smartphones depend only on its specifications and not on the environment. There is no need to re-estimate the calibration transform periodically or for different locations.
  • The MF collected by one smartphone is calibrated as a fingerprint database, and other smartphones can use this MF fingerprint database for positioning. This method can somewhat solve the MF positioning problem of heterogeneous devices. However, we can still see that the positioning accuracy of heterogeneous devices is significantly lower than that of homogeneous devices.
  • Interference sources may enhance the specificity of local MF fingerprints (e.g., proximity to fridges, lifts, metal doors). In the above experiment, the Huawei P9’s positioning accuracy was significantly higher in zone 2 than in the other two zones.
  • Despite these challenges, MF data can be used as a complementary method to improve the positioning accuracy of hybrid positioning solutions (e.g., in combination with Wi-Fi, Bluetooth, etc.).

Author Contributions

Conceptualization, G.O. and K.A.-M.; methodology, G.O. and K.A.-M.; software, G.O.; validation, G.O. and K.A.-M.; formal analysis, G.O. and K.A.-M.; investigation, G.O. and K.A.-M.; resources, G.O.; data curation, G.O.; writing—original draft preparation, G.O.; writing—review and editing, G.O. and K.A.-M.; visualization, G.O.; supervision, K.A.-M.; project administration, G.O. and K.A.-M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

Thanks to Le Trung Thanh and Zuokun Ouyang for the helpful discussions on the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. MarketAndMarket. Indoor Location Market. [EB/OL]. Available online: https://www.marketsandmarkets.com/Market-Reports/indoor-location-market-989.html (accessed on 20 July 2021).
  2. Schiller, J.; Voisard, A. Location-Based Services; Elsevier: Amsterdam, The Netherlands, 2004. [Google Scholar]
  3. Basiri, A.; Lohan, E.S.; Moore, T.; Winstanley, A.; Peltola, P.; Hill, C.; Amirian, P.; e Silva, P.F. Indoor location based services challenges, requirements and usability of current solutions. Comput. Sci. Rev. 2017, 24, 1–12. [Google Scholar] [CrossRef] [Green Version]
  4. He, S.; Chan, S.H.G. Wi-Fi fingerprint-based indoor positioning: Recent advances and comparisons. IEEE Commun. Surv. Tutor. 2015, 18, 466–490. [Google Scholar] [CrossRef]
  5. Liu, S.; Jiang, Y.; Striegel, A. Face-to-face proximity estimation using bluetooth on smartphones. IEEE Trans. Mob. Comput. 2013, 13, 811–823. [Google Scholar] [CrossRef]
  6. Zhao, X.; Xiao, Z.; Markham, A.; Trigoni, N.; Ren, Y. Does BTLE measure up against WiFi? A comparison of indoor location performance. In Proceedings of the European Wireless 2014—20th European Wireless Conference, Barcelona, Spain, 14–16 May 2014; pp. 1–6. [Google Scholar]
  7. Sun, Z.; Purohit, A.; Chen, K.; Pan, S.; Pering, T.; Zhang, P. Pandaa: Physical arrangement detection of networked devices through ambient-sound awareness. In Proceedings of the 13th International Conference on Ubiquitous Computing, Beijing, China, 17–21 September 2011; pp. 425–434. [Google Scholar]
  8. Huang, W.; Xiong, Y.; Li, X.Y.; Lin, H.; Mao, X.; Yang, P.; Liu, Y. Shake and walk: Acoustic direction finding and fine-grained indoor localization using smartphones. In Proceedings of the IEEE INFOCOM 2014—IEEE Conference on Computer Communications, Toronto, ON, Canada, 27 April–2 May 2014; pp. 370–378. [Google Scholar]
  9. Kuo, Y.S.; Pannuto, P.; Hsiao, K.J.; Dutta, P. Luxapose: Indoor positioning with mobile phones and visible light. In Proceedings of the 20th Annual International Conference on Mobile Computing and Networking, Maui, HI, USA, 7–11 September 2014; pp. 447–458. [Google Scholar]
  10. Yang, Z.; Wang, Z.; Zhang, J.; Huang, C.; Zhang, Q. Wearables can afford: Light-weight indoor positioning with visible light. In Proceedings of the 13th Annual International Conference on Mobile Systems, Applications, and Services, Florence, Italy, 18–22 May 2015; pp. 317–330. [Google Scholar]
  11. Chung, J.; Donahoe, M.; Schmandt, C.; Kim, I.J.; Razavai, P.; Wiseman, M. Indoor location sensing using geo-magnetism. In Proceedings of the 9th International Conference on Mobile Systems, Applications, and Services, Bethesda, MD, USA, 28 June–1 July 2011; pp. 141–154. [Google Scholar]
  12. He, S.; Shin, K.G. Geomagnetism for smartphone-based indoor localization: Challenges, advances, and comparisons. ACM Comput. Surv. (CSUR) 2017, 50, 1–37. [Google Scholar] [CrossRef]
  13. Haverinen, J.; Kemppainen, A. A global self-localization technique utilizing local anomalies of the ambient magnetic field. In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan, 12–17 May 2009; pp. 3142–3147. [Google Scholar]
  14. Xie, H.; Gu, T.; Tao, X.; Ye, H.; Lv, J. MaLoc: A practical magnetic fingerprinting approach to indoor localization using smartphones. In Proceedings of the 2014 ACM International Joint Conference on Pervasive and Ubiquitous Computing, Seattle, WA, USA, 13–17 September 2014; pp. 243–253. [Google Scholar]
  15. IndoorAtlas. IndoorAtlas. [EB/OL]. Available online: https://www.indooratlas.com/ (accessed on 10 July 2021).
  16. Order, F. Find & Order. [EB/OL]. Available online: https://findnorder.com/ (accessed on 8 July 2021).
  17. Qi, J.; Liu, G.P. A robust high-accuracy ultrasound indoor positioning system based on a wireless sensor network. Sensors 2017, 17, 2554. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Liu, F.; Liu, J.; Yin, Y.; Wang, W.; Hu, D.; Chen, P.; Niu, Q. Survey on WiFi-based indoor positioning techniques. IET Commun. 2020, 14, 1372–1383. [Google Scholar] [CrossRef]
  19. Mainetti, L.; Patrono, L.; Sergi, I. A survey on indoor positioning systems. In Proceedings of the 2014 22nd International Conference on Software, Telecommunications and Computer Networks (SoftCOM), Split, Croatia, 17–19 September 2014; pp. 111–120. [Google Scholar]
  20. Mazhar, F.; Khan, M.G.; Sällberg, B. Precise indoor positioning using UWB: A review of methods, algorithms and implementations. Wirel. Pers. Commun. 2017, 97, 4467–4491. [Google Scholar] [CrossRef]
  21. Singh, J.; Raza, U. Passive visible light positioning systems: An overview. In Proceedings of the Workshop on Light Up the IoT, London, UK, 21 September 2020; pp. 48–53. [Google Scholar]
  22. Koyuncu, H.; Yang, S.H. A survey of indoor positioning and object locating systems. IJCSNS Int. J. Comput. Sci. Netw. Secur. 2010, 10, 121–128. [Google Scholar]
  23. Wu, Y.; Zhu, H.B.; Du, Q.X.; Tang, S.M. A survey of the research status of pedestrian dead reckoning systems based on inertial sensors. Int. J. Autom. Comput. 2019, 16, 65–83. [Google Scholar] [CrossRef]
  24. Ouyang, G.; Abed-Meraim, K. A Survey of Magnetic-Field-Based Indoor Localization. Electronics 2022, 11, 864. [Google Scholar] [CrossRef]
  25. Finlay, C.C.; Maus, S.; Beggan, C.; Bondar, T.; Chambodut, A.; Chernova, T.; Chulliat, A.; Golovkov, V.; Hamilton, B.; Hamoudi, M.; et al. International geomagnetic reference field: The eleventh generation. Geophys. J. Int. 2010, 183, 1216–1230. [Google Scholar]
  26. Ashraf, I.; Zikria, Y.B.; Hur, S.; Park, Y. A Comprehensive Analysis of Magnetic Field Based Indoor Positioning With Smartphones: Opportunities, Challenges and Practical Limitations. IEEE Access 2020, 8, 228548–228571. [Google Scholar] [CrossRef]
  27. Li, B.; Gallagher, T.; Dempster, A.G.; Rizos, C. How feasible is the use of magnetic field alone for indoor positioning. In Proceedings of the IEEE 2012 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sydney, NSW, Australia, 13–15 November 2012; pp. 1–9. [Google Scholar]
  28. Li, B.; Gallagher, T.; Rizos, C.; Dempster, A.G. Using geomagnetic field for indoor positioning. J. Appl. Geod. 2013, 7, 299–308. [Google Scholar] [CrossRef]
  29. Frassl, M.; Angermann, M.; Lichtenstern, M.; Robertson, P.; Julian, B.J.; Doniec, M. Magnetic maps of indoor environments for precise localization of legged and non-legged locomotion. In Proceedings of the 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, Tokyo, Japan, 3–7 November 2013; pp. 913–920. [Google Scholar]
  30. Shu, Y.; Bo, C.; Shen, G.; Zhao, C.; Li, L.; Zhao, F. Magicol: Indoor localization using pervasive magnetic field and opportunistic WiFi sensing. IEEE J. Sel. Areas Commun. 2015, 33, 1443–1457. [Google Scholar] [CrossRef]
  31. Ashraf, I.; Hur, S.; Park, Y. Enhancing Performance of Magnetic Field Based Indoor Localization Using Magnetic Patterns from Multiple Smartphones. Sensors 2020, 20, 2704. [Google Scholar] [CrossRef]
  32. Ashraf, I.; Kang, M.; Hur, S.; Park, Y. MINLOC: Magnetic field patterns-based indoor localization using convolutional neural networks. IEEE Access 2020, 8, 66213–66227. [Google Scholar] [CrossRef]
  33. Lee, S.; Chae, S.; Han, D. ILoA: Indoor localization using augmented vector of geomagnetic field. IEEE Access 2020, 8, 184242–184255. [Google Scholar] [CrossRef]
  34. Vandermeulen, D.; Vercauteren, C.; Weyn, M.; Vandermeulen, D. Indoor localization using a magnetic flux density map of a building. In Proceedings of the International Conference on Ambient Computing, Applications, Services and Technologies, Porto, Portugal, 29 September–3 October 2013; pp. 42–49. [Google Scholar]
  35. Luo, H.; Zhao, F.; Jiang, M.; Ma, H.; Zhang, Y. Constructing an indoor floor plan using crowdsourcing based on magnetic fingerprinting. Sensors 2017, 17, 2678. [Google Scholar] [CrossRef] [Green Version]
  36. Pei, L.; Zhang, M.; Zou, D.; Chen, R.; Chen, Y. A survey of crowd sensing opportunistic signals for indoor localization. Mob. Inf. Syst. 2016, 2016, 4041291. [Google Scholar] [CrossRef] [Green Version]
  37. Wang, B.; Chen, Q.; Yang, L.T.; Chao, H.C. Indoor smartphone localization via fingerprint crowdsourcing: Challenges and approaches. IEEE Wirel. Commun. 2016, 23, 82–89. [Google Scholar] [CrossRef]
  38. Ayanoglu, A.; Schneider, D.M.; Eitel, B. Crowdsourcing-based magnetic map generation for indoor localization. In Proceedings of the IEEE 2018 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Nantes, France, 24–27 September 2018; pp. 1–8. [Google Scholar]
  39. Chen, L.; Wu, J.; Yang, C. MeshMap: A magnetic field-based indoor navigation system with crowdsourcing support. IEEE Access 2020, 8, 39959–39970. [Google Scholar] [CrossRef]
  40. Gao, C.; Harle, R. Semi-automated signal surveying using smartphones and floorplans. IEEE Trans. Mob. Comput. 2017, 17, 1952–1965. [Google Scholar] [CrossRef] [Green Version]
  41. Vallivaara, I.; Haverinen, J.; Kemppainen, A.; Röning, J. Simultaneous localization and mapping using ambient magnetic field. In Proceedings of the 2010 IEEE Conference on Multisensor Fusion and Integration, Salt Lake City, UT, USA, 5–7 September 2010; pp. 14–19. [Google Scholar]
  42. Wahlström, N.; Kok, M.; Schön, T.B.; Gustafsson, F. Modeling magnetic fields using Gaussian processes. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 26–31 May 2013; pp. 3522–3526. [Google Scholar]
  43. Akai, N.; Ozaki, K. Gaussian processes for magnetic map-based localization in large-scale indoor environments. In Proceedings of the 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Hamburg, Germany, 28 September–2 October 2015; pp. 4459–4464. [Google Scholar]
  44. Solin, A.; Kok, M.; Wahlström, N.; Schön, T.B.; Särkkä, S. Modeling and interpolation of the ambient magnetic field by Gaussian processes. IEEE Trans. Robot. 2018, 34, 1112–1127. [Google Scholar] [CrossRef] [Green Version]
  45. Kok, M.; Solin, A. Scalable magnetic field SLAM in 3D using Gaussian process maps. In Proceedings of the IEEE 2018 21st International Conference on Information Fusion (FUSION), Cambridge, UK, 10–13 July 2018; pp. 1353–1360. [Google Scholar]
  46. Wang, H.; Sen, S.; Elgohary, A.; Farid, M.; Youssef, M.; Choudhury, R.R. No need to war-drive: Unsupervised indoor localization. In Proceedings of the 10th International Conference on Mobile Systems, Applications, and Services, Low Wood Bay Lake District, UK, 25–29 June 2012; pp. 197–210. [Google Scholar]
  47. Abdelnasser, H.; Mohamed, R.; Elgohary, A.; Alzantot, M.F.; Wang, H.; Sen, S.; Choudhury, R.R.; Youssef, M. SemanticSLAM: Using environment landmarks for unsupervised indoor localization. IEEE Trans. Mob. Comput. 2015, 15, 1770–1782. [Google Scholar] [CrossRef]
  48. Shang, J.; Gu, F.; Hu, X.; Kealy, A. Apfiloc: An infrastructure-free indoor localization method fusing smartphone inertial sensors, landmarks and map information. Sensors 2015, 15, 27251–27272. [Google Scholar] [CrossRef] [Green Version]
  49. Zhou, P.; Zheng, Y.; Li, Z.; Li, M.; Shen, G. Iodetector: A generic service for indoor outdoor detection. In Proceedings of the 10th ACM Conference on Embedded Network Sensor Systems, Toronto, ON, Canada, 6–9 November 2012; pp. 113–126. [Google Scholar]
  50. Elhamshary, M.; Youssef, M.; Uchiyama, A.; Yamaguchi, H.; Higashino, T. TransitLabel: A crowd-sensing system for automatic labeling of transit stations semantics. In Proceedings of the 14th Annual International Conference on Mobile Systems, Applications, and Services, Singapore, 26–30 June 2016; pp. 193–206. [Google Scholar]
  51. Subbu, K.P.; Gozick, B.; Dantu, R. Indoor localization through dynamic time warping. In Proceedings of the 2011 IEEE International Conference on Systems, Man, and Cybernetics, Anchorage, AK, USA, 9–12 October 2011; pp. 1639–1644. [Google Scholar]
  52. Perez-Navarro, A.; Montoliu, R.; Torres-Sospedra, J.; Conesa, J. Magnetic field as a characterization of wide and narrow spaces in a real challenging scenario using dynamic time warping. In Proceedings of the IEEE 2018 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Nantes, France, 24–27 September 2018; pp. 1–8. [Google Scholar]
  53. Wang, Q.; Luo, H.; Zhao, F.; Shao, W. An indoor self-localization algorithm using the calibration of the online magnetic fingerprints and indoor landmarks. In Proceedings of the IEEE 2016 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Spain, 4–7 October 2016; pp. 1–8. [Google Scholar]
  54. Chen, J.; Ou, G.; Peng, A.; Zheng, L.; Shi, J. A hybrid dead reckon system based on 3-dimensional dynamic time warping. Electronics 2019, 8, 185. [Google Scholar] [CrossRef] [Green Version]
  55. Li, P.; Yang, X.; Yin, Y.; Gao, S.; Niu, Q. Smartphone-based indoor localization with integrated fingerprint signal. IEEE Access 2020, 8, 33178–33187. [Google Scholar] [CrossRef]
  56. Hoang, M.T.; Zhu, Y.; Yuen, B.; Reese, T.; Dong, X.; Lu, T.; Westendorp, R.; Xie, M. A soft range limited K-nearest neighbors algorithm for indoor localization enhancement. IEEE Sens. J. 2018, 18, 10208–10216. [Google Scholar] [CrossRef] [Green Version]
  57. Bottou, L.; Lin, C.J. Support vector machine solvers. Large Scale Kernel Mach. 2007, 3, 301–320. [Google Scholar]
  58. Wu, Z.; Xu, Q.; Li, J.; Fu, C.; Xuan, Q.; Xiang, Y. Passive indoor localization based on csi and naive bayes classification. IEEE Trans. Syst. Man Cybern. Syst. 2017, 48, 1566–1577. [Google Scholar] [CrossRef]
  59. Loh, W.Y. Classification and regression trees. Wiley Interdiscip. Rev. Data Min. Knowl. Discov. 2011, 1, 14–23. [Google Scholar] [CrossRef]
  60. Fisher, R.A. The use of multiple measurements in taxonomic problems. Ann. Eugen. 1936, 7, 179–188. [Google Scholar] [CrossRef]
  61. Nessa, A.; Adhikari, B.; Hussain, F.; Fernando, X.N. A survey of machine learning for indoor positioning. IEEE Access 2020, 8, 214945–214965. [Google Scholar] [CrossRef]
  62. Galván-Tejada, C.E.; García-Vázquez, J.P.; Brena, R.F. Magnetic field feature extraction and selection for indoor location estimation. Sensors 2014, 14, 11001–11015. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  63. Ma, Y.; Dou, Z.; Jiang, Q.; Hou, Z. Basmag: An optimized HMM-based localization system using backward sequences matching algorithm exploiting geomagnetic information. IEEE Sens. J. 2016, 16, 7472–7482. [Google Scholar] [CrossRef]
  64. Kwak, M.; Hamm, C.; Park, S.; Kwon, T.T. Magnetic Field based Indoor Localization System: A Crowdsourcing Approach. In Proceedings of the IEEE 2019 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Pisa, Italy, 30 September–3 October 2019; pp. 1–8. [Google Scholar]
  65. Zhao, H.; Wang, Z. Motion measurement using inertial sensors, ultrasonic sensors, and magnetometers with extended kalman filter for data fusion. IEEE Sens. J. 2011, 12, 943–953. [Google Scholar] [CrossRef]
  66. Xie, H.; Gu, T.; Tao, X.; Ye, H.; Lu, J. A reliability-augmented particle filter for magnetic fingerprinting based indoor localization on smartphone. IEEE Trans. Mob. Comput. 2015, 15, 1877–1892. [Google Scholar] [CrossRef]
  67. Wang, G.; Wang, X.; Nie, J.; Lin, L. Magnetic-based indoor localization using smartphone via a fusion algorithm. IEEE Sens. J. 2019, 19, 6477–6485. [Google Scholar] [CrossRef]
  68. Robertson, P.; Frassl, M.; Angermann, M.; Doniec, M.; Julian, B.J.; Puyol, M.G.; Khider, M.; Lichtenstern, M.; Bruno, L. Simultaneous localization and mapping for pedestrians using distortions of the local magnetic field intensity in large indoor environments. In Proceedings of the IEEE International Conference on Indoor Positioning and Indoor Navigation, Montbeliard, France, 28–31 October 2013; pp. 1–10. [Google Scholar]
  69. Wang, X.; Zhang, C.; Liu, F.; Dong, Y.; Xu, X. Exponentially weighted particle filter for simultaneous localization and mapping based on magnetic field measurements. IEEE Trans. Instrum. Meas. 2017, 66, 1658–1667. [Google Scholar] [CrossRef]
  70. Ashraf, I.; Hur, S.; Park, Y. Application of deep convolutional neural networks and smartphone sensors for indoor localization. Appl. Sci. 2019, 9, 2337. [Google Scholar] [CrossRef] [Green Version]
  71. Ashraf, I.; Hur, S.; Park, Y. mPILOT-magnetic field strength based pedestrian indoor localization. Sensors 2018, 18, 2283. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  72. Ashraf, I.; Hur, S.; Shafiq, M.; Kumari, S.; Park, Y. GUIDE: Smartphone sensors-based pedestrian indoor localization with heterogeneous devices. Int. J. Commun. Syst. 2019, 32, e4062. [Google Scholar] [CrossRef]
  73. Sun, D.; Wei, E.; Yang, L.; Xu, S. Improving Fingerprint Indoor Localization Using Convolutional Neural Networks. IEEE Access 2020, 8, 193396–193411. [Google Scholar] [CrossRef]
  74. Wang, X.; Yu, Z.; Mao, S. DeepML: Deep LSTM for indoor localization with smartphone magnetic and light sensors. In Proceedings of the 2018 IEEE international conference on communications (ICC), Kansas City, MO, USA, 20–24 May 2018; pp. 1–6. [Google Scholar]
  75. Bae, H.J.; Choi, L. Large-scale indoor positioning using geomagnetic field with deep neural networks. In Proceedings of the ICC 2019—2019 IEEE International Conference on Communications (ICC), Shanghai, China, 20–24 May 2019; pp. 1–6. [Google Scholar]
  76. Jang, H.J.; Shin, J.M.; Choi, L. Geomagnetic field based indoor localization using recurrent neural networks. In Proceedings of the GLOBECOM 2017—2017 IEEE Global Communications Conference, Singapore, 4–8 December 2017; pp. 1–6. [Google Scholar]
  77. Liu, T.; Wu, T.; Wang, M.; Fu, M.; Kang, J.; Zhang, H. Recurrent neural networks based on LSTM for predicting geomagnetic field. In Proceedings of the 2018 IEEE International Conference on Aerospace Electronics and Remote Sensing Technology (ICARES), Bali, Indonesia, 20–21 September 2018; pp. 1–5. [Google Scholar]
  78. Bhattarai, B.; Yadav, R.K.; Gang, H.S.; Pyun, J.Y. Geomagnetic field based indoor landmark classification using deep learning. IEEE Access 2019, 7, 33943–33956. [Google Scholar] [CrossRef]
  79. Wu, J.; Zhou, Z.; Chen, J.; Fourati, H.; Li, R. Fast complementary filter for attitude estimation using low-cost MARG sensors. IEEE Sens. J. 2016, 16, 6997–7007. [Google Scholar] [CrossRef]
  80. Ahmed, H.; Tahir, M. Accurate attitude estimation of a moving land vehicle using low-cost MEMS IMU sensors. IEEE Trans. Intell. Transp. Syst. 2016, 18, 1723–1739. [Google Scholar] [CrossRef]
  81. Zhang, Z.Q.; Yang, G.Z. Calibration of miniature inertial and magnetic sensor units for robust attitude estimation. IEEE Trans. Instrum. Meas. 2013, 63, 711–718. [Google Scholar] [CrossRef]
  82. Kok, M.; Schön, T.B. Magnetometer calibration using inertial sensors. IEEE Sens. J. 2016, 16, 5679–5689. [Google Scholar] [CrossRef] [Green Version]
  83. Wu, Z.; Wu, Y.; Hu, X.; Wu, M. Calibration of three-axis magnetometer using stretching particle swarm optimization algorithm. IEEE Trans. Instrum. Meas. 2012, 62, 281–292. [Google Scholar] [CrossRef]
  84. Kok, M.; Hol, J.D.; Schön, T.B. Using inertial sensors for position and orientation estimation. arXiv 2017, arXiv:1704.06053. [Google Scholar]
  85. Phyphox. Phyphox Sensor Database. [EB/OL]. Available online: https://phyphox.org/sensordb/ (accessed on 16 May 2022).
  86. Matyunin, N.; Wang, Y.; Arul, T.; Kullmann, K.; Szefer, J.; Katzenbeisser, S. Magneticspy: Exploiting magnetometer in mobile devices for website and application fingerprinting. In Proceedings of the 18th ACM Workshop on Privacy in the Electronic Society, London, UK, 11 November 2019; pp. 135–149. [Google Scholar]
  87. Matzka, J.; Chulliat, A.; Mandea, M.; Finlay, C.; Qamili, E. Geomagnetic observations for main field studies: From ground to space. Space Sci. Rev. 2010, 155, 29–64. [Google Scholar] [CrossRef]
  88. Le Grand, E.; Thrun, S. 3-axis magnetic field mapping and fusion for indoor localization. In Proceedings of the 2012 IEEE International Conference on Multisensor Fusion and Integration for Intelligent Systems (MFI), Hamburg, Germany, 13–15 September 2012; pp. 358–364. [Google Scholar]
  89. Angermann, M.; Frassl, M.; Doniec, M.; Julian, B.J.; Robertson, P. Characterization of the indoor magnetic field for applications in localization and mapping. In Proceedings of the IEEE 2012 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sydney, NSW, Australia, 13–15 November 2012; pp. 1–9. [Google Scholar]
  90. STMicroelectronics. LSM9DS1 Datasheet. [EB/OL]. Available online: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf (accessed on 22 March 2022).
  91. Arduino. Adafruit LSM9DS1 Accelerometer + Gyro + Magnetometer 9-DOF Breakout. [EB/OL]. Available online: https://learn.adafruit.com/adafruit-lsm9ds1-accelerometer-plus-gyro-plus-magnetometer-9-dof-breakout/arduino-code (accessed on 27 March 2022).
  92. Robert, C.; William, C.; Irma, T. STL: A seasonal-trend decomposition procedure based on loess. J. Off. Stat. 1990, 6, 3–73. [Google Scholar]
  93. Soken, H.E. A survey of calibration algorithms for small satellite magnetometers. Measurement 2018, 122, 417–423. [Google Scholar] [CrossRef]
  94. Wu, Y.; Shi, W. On calibration of three-axis magnetometer. IEEE Sens. J. 2015, 15, 6424–6431. [Google Scholar] [CrossRef] [Green Version]
  95. Ozyagcilar, T. Calibrating an eCompass in the Presence of Hard- and Soft-Iron Interference. [EB/OL]. Available online: https://www.nxp.com/docs/en/application-note/AN4246.pdf (accessed on 2 March 2022).
  96. Salamah, A.H.; Tamazin, M.; Sharkas, M.A.; Khedr, M. An enhanced WiFi indoor localization system based on machine learning. In Proceedings of the IEEE 2016 International conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Spain, 4–7 October 2016; pp. 1–8. [Google Scholar]
  97. Chan, T.F. An improved algorithm for computing the singular value decomposition. ACM Trans. Math. Softw. (TOMS) 1982, 8, 72–83. [Google Scholar] [CrossRef]
  98. Shuster, M.D.; Oh, S.D. Three-axis attitude determination from vector observations. J. Guid. Control 1981, 4, 70–77. [Google Scholar] [CrossRef]
  99. Keller, J.M.; Gray, M.R.; Givens, J.A. A fuzzy k-nearest neighbor algorithm. IEEE Trans. Syst. Man Cybern. 1985, 4, 580–585. [Google Scholar] [CrossRef]
  100. Li, T.; Zhu, S.; Ogihara, M. Using discriminant analysis for multi-class classification: An experimental investigation. Knowl. Inf. Syst. 2006, 10, 453–472. [Google Scholar] [CrossRef]
  101. Hastie, T.; Tibshirani, R.; Friedman, J.H.; Friedman, J.H. The Elements of Statistical Learning: Data Mining, Inference, and Prediction; Springer: Berlin/Heidelberg, Germany, 2009; Volume 2. [Google Scholar]
  102. Zhou, R.; Lu, X.; Zhao, P.; Chen, J. Device-free presence detection and localization with SVM and CSI fingerprinting. IEEE Sens. J. 2017, 17, 7990–7999. [Google Scholar] [CrossRef]
  103. Hsu, C.W.; Lin, C.J. A comparison of methods for multiclass support vector machines. IEEE Trans. Neural Netw. 2002, 13, 415–425. [Google Scholar]
Figure 1. Soft and hard iron effects: (a) soft iron effect; (b) hard iron effect.
Figure 1. Soft and hard iron effects: (a) soft iron effect; (b) hard iron effect.
Sensors 22 04014 g001
Figure 2. MF measurement of heterogeneous smartphones: (a,c,e) are the MFs of iPhone Xs Max, Huawei P9, and Bluebird, respectively. (b,d,f) are the histogram of magnitude for iPhone Xs Max, Huawei P9, and Bluebird, respectively.
Figure 2. MF measurement of heterogeneous smartphones: (a,c,e) are the MFs of iPhone Xs Max, Huawei P9, and Bluebird, respectively. (b,d,f) are the histogram of magnitude for iPhone Xs Max, Huawei P9, and Bluebird, respectively.
Sensors 22 04014 g002aSensors 22 04014 g002b
Figure 3. MF measurements of heterogeneous smartphones at different dates on the same path. (a) iPhone Xs Max; (b) Samsung S9; (c) Redmi Note 10 Pro; (d) Huawei P9.
Figure 3. MF measurements of heterogeneous smartphones at different dates on the same path. (a) iPhone Xs Max; (b) Samsung S9; (c) Redmi Note 10 Pro; (d) Huawei P9.
Sensors 22 04014 g003
Figure 4. Trajectory test: (a) Comparison of MF measurements of heterogeneous smartphones in the same path. (b) Comparison of the iPhone Xs Max’s MF measurements under two different paths.
Figure 4. Trajectory test: (a) Comparison of MF measurements of heterogeneous smartphones in the same path. (b) Comparison of the iPhone Xs Max’s MF measurements under two different paths.
Sensors 22 04014 g004
Figure 5. Rotatable and height-adjustable platform.
Figure 5. Rotatable and height-adjustable platform.
Sensors 22 04014 g005
Figure 6. Smartphone rotation test: (a) magnetic field with rotation; (b) magnetic direction.
Figure 6. Smartphone rotation test: (a) magnetic field with rotation; (b) magnetic direction.
Sensors 22 04014 g006
Figure 7. Ellipse plot: (a) xyz plot; (b) xy plot; (c) xz plot.
Figure 7. Ellipse plot: (a) xyz plot; (b) xy plot; (c) xz plot.
Sensors 22 04014 g007
Figure 8. Nine-DoF LSM9DS1 embedded with Arduino Pro Mini.
Figure 8. Nine-DoF LSM9DS1 embedded with Arduino Pro Mini.
Sensors 22 04014 g008
Figure 9. Nine-DoF LSM9DS1 sensor’s measurements: (a) original magnitude; (b) original magnitude histogram; (c) smoothing magnitude; (d) smoothing magnitude histogram.
Figure 9. Nine-DoF LSM9DS1 sensor’s measurements: (a) original magnitude; (b) original magnitude histogram; (c) smoothing magnitude; (d) smoothing magnitude histogram.
Sensors 22 04014 g009
Figure 10. Smartphone calibration test: (a) iPhone Xs Max; (b) Huawei P9; (c) Bluebird.
Figure 10. Smartphone calibration test: (a) iPhone Xs Max; (b) Huawei P9; (c) Bluebird.
Sensors 22 04014 g010
Figure 11. Magnitude of heterogeneous smartphones from 7 February 2020 to 29 June 2020: (a,c,e) are the original MF magnitudes of iPhone Xs Max, Huawei P9, and Bluebird, respectively. (b,d,f) are the calibrated MF magnitudes of iPhone Xs Max, Huawei P9, and Bluebird, respectively.
Figure 11. Magnitude of heterogeneous smartphones from 7 February 2020 to 29 June 2020: (a,c,e) are the original MF magnitudes of iPhone Xs Max, Huawei P9, and Bluebird, respectively. (b,d,f) are the calibrated MF magnitudes of iPhone Xs Max, Huawei P9, and Bluebird, respectively.
Sensors 22 04014 g011aSensors 22 04014 g011b
Figure 12. Comparison of heterogeneous smartphones. (a) Uncalibrated MF measurement of P2. (b) Calibration result of P2 and P10.
Figure 12. Comparison of heterogeneous smartphones. (a) Uncalibrated MF measurement of P2. (b) Calibration result of P2 and P10.
Sensors 22 04014 g012
Figure 13. Architecture of magnetic-based positioning system.
Figure 13. Architecture of magnetic-based positioning system.
Sensors 22 04014 g013
Figure 14. Building of Polytech Orléans—Galilée, Univ. of Orléans with test zone 1, 2 and 3.
Figure 14. Building of Polytech Orléans—Galilée, Univ. of Orléans with test zone 1, 2 and 3.
Sensors 22 04014 g014
Figure 15. Smartphone training set in zone 2. (a) iPhone Xs Max. (b) Huawei P9. (c) Bluebird.
Figure 15. Smartphone training set in zone 2. (a) iPhone Xs Max. (b) Huawei P9. (c) Bluebird.
Sensors 22 04014 g015
Figure 16. Confusion matrix for KNN methods with different smartphones. (a) iPhone Xs Max. (b) Huawei P9. (c) Bluebird.
Figure 16. Confusion matrix for KNN methods with different smartphones. (a) iPhone Xs Max. (b) Huawei P9. (c) Bluebird.
Sensors 22 04014 g016
Table 1. Advantages and disadvantages of indoor positioning technologies.
Table 1. Advantages and disadvantages of indoor positioning technologies.
Positioning
Technology
Coverage
Range
Positioning
Accuracy
AdvantagesDisadvantages
Ultrasound [17]∼10 mMeters
  • Slow propagation speed (around 340 m/s);
  • Limited influence of the surroundings and good penetration of walls.
  • Multipath effects and attenuation.
Wi-Fi [18]∼35 m5 m∼15 m
  • Widely distributed hot spots;
  • Low access conditions;
  • High flexibility.
  • High fingerprint collection effort;
  • Vulnerable to access point changes;
  • Fluctuation of Wi-Fi signal;
  • Radio mismatch problems;
  • Heterogeneity of Wi-Fi devices;
  • Noise and multipath distortion.
Bluetooth [19]∼10 m1∼5 m
  • Low reception range;
  • Low energy consumption.
  • Low positioning accuracy;
  • Prone to noise.
UWB [20]Few meters10∼30 cm
  • Immune to interference;
  • High accuracy;
  • High multipath resolution;
  • Large bandwidth.
  • Shorter range;
  • Extra infrastructure requirement;
  • High cost for users.
Visible light [21]Line of sight
condition
10 cm∼2m
  • Device-free; Security;
  • Less infrastructure changes in passive devices;
  • Energy efficiency.
  • High infrastructure changes on the transmitter side;
  • The burden on the user;
  • Complex infrastructure.
Vision (camera) [22]Line of sight
condition
0.01∼1 m
  • High positioning accuracy; unaffected by the external environment;
  • Strong anti-interference capability.
  • Complex algorithms;
  • High power consumption;
  • Sensitive to light conditions;
  • Expensive and lacks wide applications.
Inertial navigation [23]Hundreds
of meters
2 m
  • Low cost;
  • Easy to deploy.
  • Subject to the accuracy of inertial sensors;
  • Accumulation of drift and deviation errors.
Magnetic field [24]1∼5 m
  • Infrastructure-free;
  • Temporal stability;
  • Uniqueness due to ferromagnetic disturbance;
  • Tolerance to moving objects.
  • Low discernibility;
  • Need for frame transformation;
  • Heterogeneous device.
Table 2. Magnetometer information and operating systems for heterogeneous smartphones.
Table 2. Magnetometer information and operating systems for heterogeneous smartphones.
SmartphoneSystem
Version
Magnetometer
Model
Sensor
Vendor
Description
Huawei P9Android 8.0AK09911AKM
  • 3-axis, 14-bit;
  • 0.6 μT/LSB;
  • Range: 4900 μT
 Redmi Note 10 Pro Android 11AK0991xAKM
  • 3-axis, 14-bit;
  • 0.15 μT/LSB
  • Range: 4900 μT
Samsung S9Android 9.0AK09916CAKM
  • 3-axis, 16-bit;
  • 0.15 μT /LSB;
  • Range: 4670 μT
BluebirdAndroid 6.0Mmc3416xMEMSIC
  • 3-axis, 16-bit;
  • 0.05 μT /LSB;
  • Range: 1600 μT
iPhone Xs MaxiOS 15.3.1
Table 3. Summary of MF intensity statistic characteristics.
Table 3. Summary of MF intensity statistic characteristics.
TimeDeviceMeanStdKurtosisSkewness
22 January 2021iPhone Xs Max46.870.252.72−0.06
Huawei P950.000.523.870.32
Bluebird122.241.94506.21−0.04
4 February 2021iPhone Xs Max47.630.373.09−0.62
Huawei P949.010.533.970.37
Bluebird125.191.791764.7912.33
Table 4. MF intensity variance comparison.
Table 4. MF intensity variance comparison.
D1D2D3D4D5D6
Original MF Variance3.670.240.740.208.030.20
Filtered MF Variance0.010.190.010.160.070.11
Table 5. Accuracy comparison of homogeneous devices with different positioning methods.
Table 5. Accuracy comparison of homogeneous devices with different positioning methods.
SmartphoneKNNDecision TreeNaive BayesDiscriminant AnalysisSVM
iPhone93.3%76.7%76.7%88.0%86.0%
Huawei53.3%40.7%40.7%42.7%52.0%
Bluebird88.7%82.0%82.0%89.3%88.0%
Table 6. Accuracy comparison of heterogeneous devices with different positioning methods. (iPhone Xs Max is the training set; Huawei P9 and Bluebird are the test sets, respectively).
Table 6. Accuracy comparison of heterogeneous devices with different positioning methods. (iPhone Xs Max is the training set; Huawei P9 and Bluebird are the test sets, respectively).
SmartphoneKNNDecision TreeNaive BayesDiscriminant AnalysisSVM
Huawei59.3%53.3%53.3%47.3%46.0%
Bluebird59.3%44.7%44.7%55.3%55.7%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ouyang, G.; Abed-Meraim, K. Analysis of Magnetic Field Measurements for Indoor Positioning. Sensors 2022, 22, 4014. https://doi.org/10.3390/s22114014

AMA Style

Ouyang G, Abed-Meraim K. Analysis of Magnetic Field Measurements for Indoor Positioning. Sensors. 2022; 22(11):4014. https://doi.org/10.3390/s22114014

Chicago/Turabian Style

Ouyang, Guanglie, and Karim Abed-Meraim. 2022. "Analysis of Magnetic Field Measurements for Indoor Positioning" Sensors 22, no. 11: 4014. https://doi.org/10.3390/s22114014

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop