Embeddable Advanced Sensors for Harsh Environment Sensing Applications
View this Special IssueResearch Article  Open Access
Wenhua Shao, Fang Zhao, Cong Wang, Haiyong Luo, Tunio Muhammad Zahid, Qu Wang, Dongmeng Li, "Location Fingerprint Extraction for Magnetic Field Magnitude Based Indoor Positioning", Journal of Sensors, vol. 2016, Article ID 1945695, 16 pages, 2016. https://doi.org/10.1155/2016/1945695
Location Fingerprint Extraction for Magnetic Field Magnitude Based Indoor Positioning
Abstract
Smartphone based indoor positioning has greatly helped people in finding their positions in complex and unfamiliar buildings. One popular positioning method is by utilizing indoor magnetic field, because this feature is stable and infrastructurefree. In this method, the magnetometer embedded on the smartphone measures indoor magnetic field and queries its position. However, the environments of the magnetometer are rather harsh. This harshness mainly consists of coarsegrained hard/softiron calibrations and sensor electronic noise. The two kinds of interferences decrease the position distinguishability of the magnetic field. Therefore, it is important to extract location features from magnetic fields to reduce these interferences. This paper analyzes the main interference sources of the magnetometer embedded on the smartphone. In addition, we present a feature distinguishability measurement technique to evaluate the performance of different feature extraction methods. Experiments revealed that selected fingerprints will improve position distinguishability.
1. Introduction
Locationbased services (LBS) in smartphones have attracted tremendous attention in recent years, since convenient and high precision localization services improve people’s daily life significantly. These services include navigating a driver to a destination in an unfamiliar area, searching a book inside a large library, or finding a friend at a complex airport.
However, traditional localization techniques, GPS, for example, are only available in outdoor scenarios. They become invalid when it comes to indoor areas, because walls and roofs dramatically attenuate signals from GPS satellites.
Therefore, many indoor localization techniques have been presented by researchers. These techniques include WiFi [1–4], echo [5, 6], and FM [7–9] based approaches. However, WiFi based localization methods are energy expensive for smartphones. Echo approaches are too sensitive to location change, which makes them improper for continuous positioning in a large area. FM methods often become invalid when radio frequency (RF) signals are attenuated by obstacles.
With the development of sensing systems mounted on smartphones, sensing based approaches to indoor localization became available. That is, locationrelated signals are sensed, and then the user’s location is estimated based on these signals. Indoor magnetic field is one kind of locationrelated signals, which can be sensed by magnetometers embedded on smartphones.
Indoor magnetic field is a pervasive anomalies field induced by geomagnetic field. Because of its locationrelated, infrastructurefree, and energy efficient features, many researchers have focused on utilizing indoor geomagnetic field for indoor localization purposes. Some experts [10] leverage indoor magnetic anomalies as landmarks, since these anomalies generated by ferromagnetic objects, that is, pillars and doors, are relatively stable. Other researchers [11] construct an indoor magnetic magnitude model, using probability method to estimate user location. In order to improve localization feasibility, experts [10, 12] introduced particle filter framework, which makes it possible to fuse multipositioning methods, including WiFi, Bluetooth, and pedestrian dead reckoning (PDR).
The smartphone collects the indoor magnetic field signal by the magnetometer; however, this process is interfered in by hard/softiron effect, hand quivers, and electronic noise, which are not locationrelated. These interferences decrease the distinguishability of location fingerprints in magnetic field based localization systems.
The main purpose of this paper is to extract locationrelated only feature of indoor magnetic fields for indoor localization. Although indoor magnetic field contains location information, this information is interfered in by hard/softiron effect, hand quiver, and electronic noise. Therefore, rejecting interference signals and keeping locationrelated signals are beneficial for improving indoor localization performance.
There are two main challenges to magnetic field magnitude (MFM) based location feature extraction. The first one is to ascertain interference sources of magnetometers embedded on the smartphone. This paper first examines the model of magnetometer measurement and then derives the inverse model to estimate indoor magnetic field from magnetometer measurement. With this inverse model as well as related experiments, it is found that the fundamental interference sources of real MFM estimation are coarsegrained soft/hardiron calibration and sensor electronic noise.
Secondly, there are various magnetic field fingerprint extraction methods; hence, it is necessary to select a high discernible one among them. However, a few researchers have studied this problem. GalvánTejada et al. compared temporal, spectral, and energy features of indoor magnetic field [13]. But their work concentrates on room level classification. Although localization accuracy can reflect fingerprint performance in some degree, it is affected by the localization algorithm. Therefore, to measure fingerprint distinguishability, this paper presents a novel and lightweight distinguishability measurement method (DAME). This method provides an independent way to qualify fingerprint distinguishability, and it has low overhead compared to previous works.
In conclusion, our contributions are threefold:(i)We perform indepth studies of indoor magnetic field attributes and magnetometer measurement. Then, we present the notion that coarsegrained soft/hardiron calibration and sensor noise are the fundamental reasons of device heterogeneity and user diversity.(ii)We propose a novel fingerprint distinguishability measurement method, DAME, which is especially suitable for low discernibility MFM fingerprint.(iii)With DAME, we perform a study on various fingerprint extraction methods and find that Butterworth low pass filter (LPF) is a high discernible fingerprint extraction method of our experiments.
This paper conducts extensive experiments on commercially available smartphones to evaluate the research. Experiment result shows that coarsegrained soft/hardiron calibration and sensor electronic noise were pervasive in various kinds of smartphones. Butterworth filter fingerprint is a high discernible fingerprint extraction method. Confusion matrixes and their localization errors are also computed to show the localization accuracy improvement with the high discernible fingerprint.
This paper is organized as follows. Section 2 describes the related work. Section 3 reviews the background of indoor magnetic field formation as well as its advantages and challenges in indoor localization. Section 4 presents the main interferences sources of embedded magnetometer on the smartphone. Section 5 presents the DAME fingerprint distinguishability measurement method and the study for finding a high discernible fingerprint. Section 6 describes the experiments. Finally, Section 7 concludes the paper with a discussion.
2. Related Work
Localization technology is an enabling technology in pervasive computing area, which provides a foundation for the contextaware service. Many efforts have been devoted to this field, and there are already numerous commercially available positioning technologies. In recent years, various indoor MFM based localization methods have been presented; however, there are few researches related to MFM location feature extraction.
ChavezRomero et al. presented a robotic wheelchair based indoor localization method using visual markers and particle filter [14]. Their system is mounted on a wheelchair, and the wheels can provide odometry data, which is not available for the pedestrian user holding a smartphone.
Li et al. addressed reliable and accurate indoor localization using inertial sensors commonly found on commodity smartphones [15]. They utilized indoor magnetic field based compass to provide orientation for their particle filter localization system.
Shu et al. described a fusion indoor localization system with pervasive magnetic field and opportunistic WiFi [16]. They noticed the phenomena where different devices and different smartphone attitudes cause magnetic field measurement offset. So, they remove the mean of MFM sequences to overcome this offset. Besides, their system uses these sequences to update particle weight at each step event.
Frassl et al. researched the magnetic maps of indoor environments [17]. They studied the magnetic field intensity and direction distribution features. Based on their analysis, they implemented a high precision indoor localization system using foot mounted inertial sensors as well as a magnetometer.
Angermann et al. conducted indepth studies on the characterization of the indoor magnetic field [18]. They utilized a well calibrated sensor package mounted on a measuring device with code odometry to collect and evaluate indoor magnetic field. In their work, they presented the notion that the multiple measurements along a path showed strong modulation.
Le et al. studied magnetic field mapping and fusion method for indoor localization [11]. Their algorithm proves that local magnetic disturbances carry enough information to localize without the help from other sensors. They built a magnetometer measurement probability model to update particle weight in their particle filter based positioning algorithm.
Xie et al. built MaLoc, a magnetic fingerprint based indoor localization system [12]. They presented the notion that magnetometer’s sensitivity is different across different smartphones. Hence, they used magnetic magnitude difference to compare realtime sampling data with trained data.
GalvánTejada et al. presented an extension and improvement of their previous indoor localization model [13]. The model tests many magnetic field signal features, including kurtosis, mean, and slope. However, their model is designed for room level classification.
Although there are various magnetic field feature extraction methods utilized by different indoor localization systems, they mainly focus on localizing users through original magnetic magnitude fingerprints. However, the original fingerprints are interfered in by coarsegrained soft/hard calibration and sensor electronic noise. Therefore, this paper gives an indepth study on how to reduce magnetometer interferences and present the DAME algorithm to evaluate the performance of different MFM feature extraction methods.
3. Insight into Indoor Magnetic Field
Modern buildings generally adopt steel reinforced concrete in their structures. However, these ferromagnetic materials distort the magnetic field in various manners in different areas. Though this distortion is negative for orientation estimation of pedestrian dead reckoning (PDR), it can be used as indoor location feature.
Indoor magnetic field is distorted locally, because of pillars, escalators, and large iron furniture. These ferromagnetic objects change the spread of magnetic lines, so indoor MFM reveals different intensities across different locations. Figure 1 illustrates this distortion: the magnitude changes in different locations.
Indoor magnetic field’s distortion patterns are static, because the geomagnetic field varies rather slowly. Moreover, the indoor magnetic anomalies are mainly formed by building ferromagnetic structure. As a result, provided that the structure remains unchanged, the magnetic anomalies will be invariant. For instance, Figure 1 demonstrates this stability. The MFM of one corridor was collected twice over 50 days. Although there is a calibration offset between the two signals, the anomalies of the two are similar. The calibration offset will be explained in Section 5.2.
Magnetic field has low discernibility. Geomagnetic magnitude at the earth’s surface ranges from 25 to 65 T [19]. Because indoor magnetic field is mainly formed by distortion of the geomagnetic field, this narrow range is also the approximate magnitude scope of indoor magnetic field. As a result, the number of similar distortion patterns will increase with the enlargement of the searching scope. Take the red line in Figure 1 as an example; there is only one location’s magnitude, which is equal to 50 when the search scope is limited in the first one meter. But the location number increases to 3 when the search scope increases to ten meters. Hence, it can be deduced that the longer the search scope is, the more confusing locations there are.
As a brief summary, indoor magnetic field is locally distorted and location stable, which are the advantages for indoor localization, but the field’s low discernibility brings about challenges to location feature comparison.
4. Indoor Magnetic Field Interferences
In this section, we discuss the process of magnetometer measuring the geomagnetic field and magnetometer noise. Furthermore, we analyze interference sources of magnetometer measurement.
4.1. Characteristics of Magnetometers on Smartphones
The complicated inner electromagnetic environment of smartphones and the diversity in user behavior make it difficult to precisely measure environment magnetic field.
The magnetometer measures indoor magnetic field’s value of a position relative to the orientation of the phone. This value is a triple with each element representing the magnitude of the magnetic field along the three dimensions of a phone’s frame. Moreover, given that the expression of a vector in frame is , then a magnetometer measurement can be represented as follows [20]:
The smartphone magnetometer is interfered with by additive interference and multiplicative interference when measuring geomagnetic field.
Additive interference in magnetometer measurement consists of two parts: hardiron effect and sensor offset, as (1) shows. In addition, hardiron effect is the fact that permanently magnetized ferromagnetic components on Printed Circuit Boards (PCBs) add an offset field when the magnetometer is measuring geomagnetic field. Sensor offset is the zero field offset in magnetometer’s factory calibration.
Multiplicative interference in magnetometer measurement consists of three parts: softiron effect, magnetometer nonorthogonality, and unequal gains, as (2) reveals. First, softiron effect is the fact that outer fields, for example, geomagnetic and speaker field, onto unmagnetized ferromagnetic components on the PCB, induce interfering magnetic field when the magnetometer is measuring geomagnetic field. Second, magnetometer nonorthogonality is the lack of perfect orthogonality between sensor axes and sensor relative to the phone’s coordinate system. Finally, unequal gains are the different gains in magnetometer in all three axes.
Equation (3) demonstrates the overall process of smartphone magnetometer measuring geomagnetic field. Firstly, the real geomagnetic field is , which is expressed in north, east, down (NED) frame. However, the magnetometer measurement is in phone frame, so the geomagnetic field in phone frame is , with representing transform matrix from earth frame to phone frame. Moreover, considering all possible phone frames, the universal set of geomagnetic fields in phone frames can be illustrated as the red sphere in Figure 2. Secondly, the magnetometer is interfered with by multiplicative interference, which makes the magnetic field gain different along different axes. As a result, the universal set becomes an ellipsoid. Finally, additive interference makes the universal set ellipsoid leave the original phone frame, as the blue sphere shows. In other words, one magnetometer measurement is one vector from original to a point of the blue ellipsoid.
Equation (3) reveals that magnetometer measurement is heavily interfered with, which cannot be used for localization. However, one practical way is to estimate from . From (3), the estimated can be easily derived:
Furthermore, considering that is a unit frame transform matrix, the magnitude of can be drawn from (4):
In (5), and are estimated multiplicative and additive interference parameter. Solving and is actually to compute the blue ellipsoid center and its ellipsoid parameters in Figure 2. To solve them, one general way for commodity smartphones is to rotate the device in a figure of 8 in a small space. Consequently, the magnetometer collects omnidirectional data. These data are distributed on the blue ellipsoid in Figure 2. Hence, using Cholesky factorization [21], the ellipsoid center and ellipsoid parameter can be derived, that is, and . As a result, is computed.
As (5) shows, the precision of estimation depends on the precision of estimated and . Although the smartphone always runs background magnetometer calibration, it is a complicated problem. As a result, only coarse calibration parameter can be computed. Hence, the magnetic magnitude varies as the device rotates. Figure 3 clearly demonstrates these properties, where the magnetic signals were collected within a small cube with 15 cm edges: red dash line signal was collected with parallel movement. Blue fullline signal was collected with omnidirectional rotational movement. In the experiment result, parallel signal fluctuation scope was 3.7 T, while rotational signal fluctuation scope was 13.3 T. In contrast, the fluctuation scope of a typical road is approximately 30 T, as Figure 1 depicted, comparable with that of omnidirectional rotation case. Therefore, random omnidirectional device rotation is interfering enough to pollute location feature, as Figure 4 shows: the magnetic signal is collected during walks along a straight corridor with 4 different attitudes and the last one was collected with rotating the device all the way. Obviously, although different attitude magnitude signals have different mean values, their alternating current (AC) component signals are similar. But, for rotation magnitude signals, they had become ambiguous.
Therefore, the coarsegrained additive and multiplicative parameters in the smartphone can be characterized as measured magnetic magnitude being sensitive to rotation movement. In other words, magnetic magnitude is only available when the device stays at a relatively stable situation.
4.2. Magnetometer Measurement
Smartphone magnetometer suffers from random fluctuation signals, including excitation current, feedback circuit and signal conditioning from the sensor inside [22], and currents within coils outside the sensor [23]. Consequently, these signals will make the magnetometer output signal combined with noise.
Figure 5 reveals histogram statistical result of the noisy MFM signal collected by a static smartphone. Obviously, the signal obeyed normal distribution, with mean which equaled 54.16 T and standard deviation of 0.72 T. So, the indoor magnetic field measure equation (3) should be updated to (6), where is Gaussian noise. Hence,
Therefore, the estimated geomagnetic magnitude is updated to (7), where is Gaussian noise. Hence,
In conclusion, this section analyzes interference sources of the magnetometer, including hand movement and senor noise, which are harmful to indoor localization.
5. Indoor Magnetic Fingerprint Extraction
This section presents several indoor MFM fingerprint extraction methods. In order to compare these methods, firstly, a fingerprint distinguishability evaluation model is presented. Secondly, a series of evaluations were conducted to find a high discernible extracted fingerprint.
5.1. Fingerprint Segment Distinguishability Evaluation Method
Indoor magnetic field is a locationrelated magnetic field induced by geomagnetic field that is steadily distorted by steel reinforced concrete building structures. Hence, it can be utilized as indoor location feature, that is, location fingerprint. A location fingerprint is a static map between location space and feature space whereby one can determine a location from observed features. In other words, an eligible fingerprint has two features: time stability and spatial distinguishability. The time stability of indoor MFM mainly depends on the stabilization of geomagnetic field and building structures discussed in the last section. As to the spatial distinguishability, experts have provided some insights into it [17, 18]; however, as far as we know, there is no study on quantifying distinguishability. In this section, the paper first introduces the feature of MFM distinguishability and then its calculation method.
Indoor magnetic field based positioning generally has two phases: model training phase and fingerprint localization phase. In the model training phase, trainers collect spatial fingerprint signal, then mark them with location information, and finally generate the localization model. In the fingerprint localization phase, users collect realtime fingerprint signal and then estimate users’ locations by comparing the realtime fingerprint signals and the localization model. For example, given a localization model (represented as in Figure 6), suppose a user has collected a target segment (represented as in Figure 6). To localize the user is to find the most possible position of the target segment in the localization model. This process is usually implemented by comparing the similarity between the target segment and all candidate segments in the model with a sliding window technique. However, false positions ( and ) sometimes are more similar than the true position due to the interferences analyzed in the last section. This paper defines the ability of a target fingerprint segment to be distinguished from the localization model as fingerprint segment distinguishability.
Fingerprint segment distinguishability is proportional to segment length while it is inversely proportional to model fingerprint length. Figure 6 clearly demonstrates these relations: (a) shows that, in the first 20 meters of the model fingerprint, there are only two candidate segments, but the number rises to 3 when model fingerprint extends to 55 meters. However, when target segment length increases to 4 meters, candidate segments number drops from 3 to 1.
The signal similarity between a target segment and a candidate segment can be measured with mean Euclidean distance between them. Moreover, the similarities between the target segment and all possible candidate segments in model fingerprint can be calculated through a sliding window. For instance, the similarities between the target segment and possible candidate segments in Figure 6 can be illustrated as Figure 7, in which the red stars are the ground truth location of target segment. In (a), the three highest peaks represent the three most similar candidate segment locations in fingerprint 2, and the same goes for (b).
(a)
(b)
In order to measure the distinguishability of MFM fingerprint segment against a model fingerprint, the segment distinguishability needs to be quantified. Although error distance is one common way to measure the performance of the localization algorithm, it is infeasible to assume that error distance represents distinguishability, because of MFM’s low discernibility. Therefore, the paper proposes a distinguishability measurement method (DAME) based on the number of similar segments and the signal similarity of the Euclidean distance of AC signal component, which is summarized in Algorithm 1.

Segment distinguishability increases as target fingerprint compare length extends. Distinguishability range lies in (]. When target segment distinguishability equals 1, it will represent the notion that, with the corresponding compare length, the segment can be localized within the given fingerprint. Figure 8 reveals this relation of the fingerprints in Figure 6: when target segment length increases by 2.6 m, the segment distinguishability rises to the maximum, and hence its location can be confirmed. Consequently, in order to locate a fingerprint segment from the given localization model, the compare length for this segment should be greater than the value whose distinguishability first equals 1.
5.2. LocationRelated Fingerprint Extraction
Indoor magnetic field signal is locationrelated; however, it is difficult to precisely collect this signal by the magnetometer of the smartphone, because of coarsegrained calibration parameter and sensor electronic noise, as discussed in Section 4. Consequently, these interferences decrease magnetic magnitude distinguishability, causing localization accuracy to decay.
In order to improve localization performance, it is important to filter the signals collected by the magnetometer and extract locationrelated only fingerprints from these signals. There are three main affecting factors in MFM collection: temporal influence and device attitude, body tremble, and sensor electronic noise. For temporal influence, users will inevitably approach ferromagnetic materials, including iron chairs and cars, with their smartphones in daily life. These materials will change the interior magnetic environment inside the devices. Although the calibration routine of the smartphone will automatically calibrate this change, this process is coarsegrained, which will cause calibrated signal shift up or down. This shift will remain stable until another calibration happens, as shown in Figure 1. The device attitude has similar effects with temporal influence, as shown in Figure 4. Therefore, it is necessary to remove the direct current (DC) component of the magnetic signal. However, the left AC component will still be interfered with by hand tremble and sensor electronic noise.
The body tremble factor is the slight random quiver when a user carrying a device moves around. Affected by coarsegrained hard/softiron effect, this tremble will add distorted magnetometer output. Finally, the sensor electronic noise factor is an additive noise to magnetometer output. Because these factors have little relation with locations, it is supposed that the removal of these signals components improves localization performance.
Several fingerprint extraction methods are studied to reject locationunrelated signal components: wavelet transform, Savitzky–Golay filter, moving average filter, wavelet denoising, and Butterworth filter. The wavelet transform method computes a series of wavelets on different scales with the given wavelet [24]. The wavelet transform of the signal in Figure 1 is represented as Figure 9. In other words, this method transforms time domain signal into frequency domain signal, and it is expected that this transform might reject locationunrelated signal components. In this transformation, different wavelet factor needs different spatial delay; therefore, 1 meter is chosen as max. tolerance delay, as the blue line shows. Consequently, the fingerprint is shown in Figure 10, and the vertical heads and tails are transition areas that should be discarded.
The Savitzky–Golay filter method fits successive subsets of adjacent data points with a lowdegree polynomial by the method of linear least squares, which is also known as convolution [25]. This method is supposed to increase the signaltonoise ratio without greatly distorting the signal. Consequently, the resulting fingerprint is shown in Figure 11.
The moving average filter method smooths data using a moving average filter, that is, denoising MFM signal by averaging adjacent measurements, with the sacrifice of some adjacent discernibility. The resulting fingerprint is revealed as Figure 12.
The wavelet denoising method performs denoising using given wavelets [26]. Typically, there are three steps in the procedure: original signal decomposition to get detail coefficients, detail coefficients modification based on threshold, and signal reconstruction based on modified detail coefficients. The consequent fingerprint is shown in Figure 13.
The Butterworth filter is a maximally flat magnitude filter that is designed to have as flat a frequency response as possible in the pass band [27]. Considering the indoor MFM mainly distorted by building structures which are much larger than user movement, low pass filter (LPF) is suitable for fingerprint extracting. The magnitude response of the LPF used in the system is depicted in Figure 14, with a pass band from 0 to 0.9 Hz. The resulting fingerprint is shown in Figure 15.
In order to compare the distinguishability of different fingerprint extraction methods, the experiment gathered statistics of mean DAME distinguishability of each method under different compare lengths, as shown in Figure 16. Clearly, as far as the experiments reveal, except for wavelet transform method, other fingerprint extraction methods improved fingerprint distinguishability compared to that of original fingerprint, especially when the compare lengths of fingerprint segments are short. This improvement owes to the denoising of the original signal. In addition, Butterworth filter fingerprint has the highest distinguishability among all these extracted fingerprints, since it rejects noise based on the signal’s frequency rather than simple average adjacent measurements.
In conclusion, this section proposes a fingerprint distinguishability measurement method, DAME; furthermore, with this method, Butterworth LPF is found to be a high discernible fingerprint extraction method for indoor magnetic field among the studies.
6. Experiments
This section first presents the experiment results of soft/hardiron calibration on different smartphones. Then, the paper compares and evaluates the fingerprint extraction methods of indoor MFM from various aspects.
6.1. Implementation
6.1.1. Devices
The devices used in our experiments were three commercially available smartphones: HTC One X, Samsung S4, and Huawei Mate7, with their main CPU and sensor parameters specified in Table 1. The algorithm was implemented in Matlab 2016a, running on a PC with Intel i5 dual core CPU, 16 G RAM, and Win10 64bit OS.

6.1.2. Testing Area
These experiments were conducted in a large building, with a testing area of about 1500 m^{2}. This is a typical office environment.
6.1.3. Fingerprint Collection
The road used in our experiment was about 50 meters long. Testers were required to walk at a natural pace along the road, with the phone held in their hand.
6.2. Interference Sources of Indoor Magnetic Field
This part evaluates magnetometer interference sources from two respects: magnetometer calibration error of hard/soft iron and magnetometer electronic noise.
6.2.1. Ubiquitous Hard/SoftIron Calibration Error on Smartphones
Testers selected a small free space (0.001 m^{3} approximately) inside the lab. Then, for the three test devices, testers successively picked up one of them conducting two movements for one minute: first, testers randomly parallelmoved the phone inside the small space keeping its attitude static. Then, testers randomly rotated the phone with omnidirectional movement. The space was so small that the magnetic field inside this space can be seen as a constant field. Consequently, the first parallel movement was a little affected by hard/softiron effect; in contrast, the second rotation movement collected MFM from multiple directions of the smartphone, which exhibited the anisotropy of the magnetometer, as Figure 17 reveals.
(a)
(b)
6.2.2. Relatively Stable Hard/SoftIron Calibration Offset on the Same Smartphone
Testers randomly selected three small spaces (0.001 m^{3} approximately for each) inside the lab. Then, testers conducted two movements as the last experiment did in each space with one device. Clearly, the magnetic fields of the three spaces were different. Figure 18 shows that despite the fact that collecting spaces were different, causing different magnitude mean value, the standard deviation differences between parallel movement and rotation movement are similar, which suggests relative stabilization of hard/softiron calibration for the same device.
(a)
(b)
6.2.3. Pervasive Magnetometer Noise on Smartphones
In order to measure magnetometer noise of different smartphones, testers successively put the three smartphones in the same place and then collected MFM for one minute. As Figure 19 reveals, all the three clusters of sample data fit normal distribution, which suggests a common Gaussian electronic noise. Furthermore, both the mean and the standard deviation of MFM of the three smartphones are different: firstly, the different means suggests different hard/softiron calibration error of different smartphones, while the different standard deviations reveal pervasive but different sensor noise level.
6.2.4. Relatively Stable Magnetometer Noise on the Same Smartphone
In order to examine magnetometer noise level of the same smartphone in different places, testers randomly selected three places in the lab and then put the phone in each place and kept the smartphone static sampling for one minute. As Figure 20 reveals, the three distributions have different mean magnitude, but their standard deviations were similar, which suggests relatively stable sensor noise on the same device.
In conclusion, as far as the experiment is concerned, the soft/hard calibration offsets and magnetometer noise levels on different smartphones are different; however, these offsets and noise levels are relatively stable on the same device. These two factors are the main sources of magnetometer interferences.
6.3. Fingerprint Extraction Evaluation
In this part, testers first examine the distinguishability of MFM fingerprint extracted by different methods. Then, they evaluate the optimum fingerprint by confusion matrix.
To evaluate the distinguishability, testers calculate mean DAME distinguishability with different extraction methods between the two fingerprints shown in Figure 1. Moreover, distinguishability is affected by fingerprint compare length, so testers need to evaluate distinguishability under different compare lengths. Hence, the mean DAME distinguishability sequence calculation for each extracted fingerprint contains the following steps.
Step 1. Assign a compare length and fingerprint extraction method .
Step 2. With , extract two fingerprints and from the two original fingerprints in Figure 1.
Step 3. Randomly select a fingerprint segment with compare length from fingerprint .
Step 4. Calculate the DAME distinguishability of this fingerprint segment against fingerprint .
Step 5. Repeat Steps 2–4 one hundred times to get 100 DAME distinguishability values and then calculate the mean DAME distinguishability.
Step 6. Assign a new compare length and repeat Steps 1–5 to get a DAME distinguishability sequence with different compare length.
For each experiment, the two original fingerprints were the reference group. Furthermore, to make the experiments precise, the fingerprint segments selected in Step 3 for different fingerprint extraction methods are the same.
6.3.1. Wavelet Fingerprints Extracted by Different Analyzing Wavelets
Testers used different analyzing wavelets in fingerprint extraction to get different fingerprints and computed their mean DAME distinguishability sequence. The statistic result is shown in Figure 21: morl wavelet performs the best, Haar wavelet has a little improvement, and the other 3 wavelets are even worse than the original fingerprint. This result shows that the performance of wavelet fingerprint extraction depends on wavelet selection.
6.3.2. Savitzky–Golay Fingerprints Extracted by Different Polynomial Orders
Testers changed the polynomial order in Savitzky–Golay filter fingerprint extraction to get different fingerprints and computed their mean DAME distinguishability sequence. Figure 22 reveals that low order filters have higher distinguishability.
6.3.3. Average Moving Fingerprints Extracted by Different Average Lengths
Testers changed the smooth length in average moving fingerprint extraction to get different fingerprints and computed their mean DAME distinguishability sequence. Figure 23 reveals that moving average filter only improves distinguishability when compare lengths are short.
6.3.4. Wavelet Denoising Fingerprints Extracted by Different Analyzing Wavelets
Testers used different analyzing wavelets in fingerprint extraction to get different fingerprints and computed their mean DAME distinguishability sequence. The statistic result is shown in Figure 24: all analyzing wavelets have the ability to improve fingerprint distinguishability, especially rbio2.2.
6.3.5. Butterworth LPF Fingerprints Extracted by Different Low Pass Frequencies
In this experiment, testers changed the low pass frequency in fingerprint extraction to get different fingerprints and then computed their mean DAME distinguishability sequence. The statistic result is shown in Figure 25: low frequencies, for instance, 0.5 Hz and 1.0 Hz, improve distinguishability than higher frequencies.
6.3.6. Diversity Fingerprint Extraction
In this experiment, testers selected all the most discernible fingerprints in each previous experiment and compared their distinguishability together. As Figure 26 shows, when compare length is less than 7 meters, Butterworth filter has overall the best distinguishability; however, when compare length is greater than 7 meters, there is no big difference between different fingerprint extraction methods.
6.3.7. Confusion Matrix of Butterworth LPF Fingerprint
In order to intuitively illustrate the improvements between original fingerprints and Butterworth LPF extracted fingerprints, testers leveraged confusion matrix. Each element of the matrix is the similarity between two locations of two fingerprints. The similarity is the mean Euclidean distance of the two fingerprint segments started from these locations. The segments are 5 m long. Testers calculated confusion matrices for the original signal pairs, the Butterworth fingerprint pairs, and the subtracted fingerprint pairs. The relations of the three fingerprint pairs are as follows:
The three confusion matrices are shown in Figures 27, 28, and 29. Clearly, as Figure 27 shows, although the segments of the same location IDs are similar to each other (the highlight main diagonal), there are many confusing points in wrong locations (highlight points outside the main diagonal). Figure 28 reveals that the similarity between the segments of the same locations improved, while similarities between segments of different locations were decreased. In Figure 29, testers can see that there is no highlight main diagonal. This means that one segment in subtracted fingerprint 1 is similar to all segments in subtracted fingerprint 2. In other words, the subtracted fingerprints have no location information.
If testers use most similar points as localization result, then the third quartile of the localization errors for the original fingerprint is 0.78 m and for Butterworth fingerprint is 0.47 m, 40% improved.
Therefore, this experiment revealed that Butterworth fingerprint improved fingerprint distinguishability, and the subtracted signal is harmful for localization.
7. Conclusions
This paper firstly discusses the main interference sources for the data collection of a smartphone; that is, due to coarsegrained hard/softiron calibration, slight hand tremble brings about interference in magnetometer measurement. Sensor electronic noise is another source of magnetometer interference.
Then, we present DAME, a distinguishability evaluation model for MFM based fingerprint. With this model, the distinguishability of one fingerprint segment against another fingerprint can be represented. Moreover, given compare length, the distinguishability between two fingerprints can be quantified by mean DAME distinguishability.
Finally, utilizing the DAME distinguishability, we compare several extraction methods for MFM based fingerprint. Consequently, we find that Butterworth filter fingerprint is the most discernible one as far as our experiments are concerned.
Moreover, the experiments confirm the effectiveness of distinguishability measurement method, DAME, as well as the superiority of Butterworth filter fingerprint.
Competing Interests
The authors declare that there are no competing interests regarding the publication of this manuscript.
Acknowledgments
This work was supported in part by the National Natural Science Foundation of China (61374214), the Major Projects of the Ministry of Industry and Information Technology (2014ZX03006003002), the Development Special Project of Shenzhen Emerging Industries of Strategic Importance ([]1787), the 863 Achievement Transformation Project of Tianjin (14RCHZGX00857), and the International S&T Cooperation Program of China (2015DFG12520).
References
 C. Yang and H.R. Shao, “WiFibased indoor positioning,” IEEE Communications Magazine, vol. 53, no. 3, pp. 150–157, 2015. View at: Publisher Site  Google Scholar
 X. Xu, L. Xie, and L. Peng, “Design of indoor positioning system based on WiFi signal intensity characteristic,” Computer Engineering, vol. 41, pp. 87–91, 2015. View at: Google Scholar
 Z. Tian, X. Fang, M. Zhou, and L. Li, “Smartphonebased indoor integrated WiFi/MEMS positioning algorithm in a multifloor environment,” Micromachines, vol. 6, no. 3, pp. 347–363, 2015. View at: Publisher Site  Google Scholar
 F. Yu, M. Jiang, J. Liang et al., “An indoor localization of WiFi based on branchbound algorithm,” in Proceedings of the International Conference on Information Science, Electronics and Electrical Engineering (ISEEE '14), vol. 1–3, pp. 1305–1307, Sapporo, Japan, April 2014. View at: Google Scholar
 Y.C. Tung and K. G. Shin, “EchoTag: accurate infrastructurefree indoor location tagging with smartphones,” in Proceedings of the 21st Annual International Conference on Mobile Computing and Networking (MobiCom '15), pp. 525–536, Paris, France, September 2015. View at: Publisher Site  Google Scholar
 K. Liu, X. Liu, and X. Li, “Guoguo: enabling finegrained indoor localization via smartphone,” in Proceedings of the 11th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys '13), pp. 235–248, Taipei, Taiwan, June 2013. View at: Publisher Site  Google Scholar
 A. Popleteev and T. Engel, “Devicefree indoor localization based on ambient FM radio signals,” International Journal of Ambient Computing and Intelligence, vol. 6, no. 1, pp. 35–44, 2014. View at: Publisher Site  Google Scholar
 V. Moghtadaiee and A. G. Dempstera, “Indoor location fingerprinting using FM radio signals,” IEEE Transactions on Broadcasting, vol. 60, no. 2, pp. 336–346, 2014. View at: Publisher Site  Google Scholar
 Y. Chen, D. Lymberopoulos, J. Liu, and B. Priyantha, “Indoor localization using FM signals,” IEEE Transactions on Mobile Computing, vol. 12, no. 8, pp. 1502–1517, 2013. View at: Publisher Site  Google Scholar
 K. P. Subbu, B. Gozick, and R. Dantu, “LocateMe: magneticfieldsbased indoor localization using smartphones,” ACM Transactions on Intelligent Systems and Technology, vol. 4, no. 4, article 73, 2013. View at: Publisher Site  Google Scholar
 E. Le Grand and S. Thrun, “3Axis magnetic field mapping and fusion for indoor localization,” in Proceedings of the IEEE International Conference on Multisensor Fusion and Integration for Intelligent Systems (MFI '12), pp. 358–364, September 2012. View at: Publisher Site  Google Scholar
 H. Xie, T. Gu, X. Tao, H. Ye, and J. Lv, “MaLoc: a practical magnetic fingerprinting approach to indoor localization using smartphones,” in Proceedings of the ACM International Joint Conference on Pervasive and Ubiquitous Computing (UbiComp '14), Seattle, Wash, USA, September 2014. View at: Publisher Site  Google Scholar
 C. E. GalvánTejada, J. Pablo GarcíaVázquez, and R. F. Brena, “Magnetic field feature extraction and selection for indoor location estimation,” Sensors, vol. 14, no. 6, pp. 11001–11015, 2014. View at: Publisher Site  Google Scholar
 R. ChavezRomero, A. Cardenas, M. Maya, A. Sanchez, and D. Piovesan, “Camera space particle filter for the robust and precise indoor localization of a wheelchair,” Journal of Sensors, vol. 2016, Article ID 8729895, 11 pages, 2016. View at: Publisher Site  Google Scholar
 F. Li, C. Zhao, G. Ding, J. Gong, C. Liu, and F. Zhao, “A Reliable and accurate indoor localization method using phone inertial sensors,” in Proceedings of the 14th International Conference on Ubiquitous Computing (UbiComp '12), pp. 421–430, Pittsburgh, Pa, USA, September 2012. View at: Publisher Site  Google Scholar
 Y. Shu, C. Bo, G. Shen, C. Zhao, L. Li, and F. Zhao, “Magicol: indoor localization using pervasive magnetic field and opportunistic WiFi sensing,” IEEE Journal on Selected Areas in Communications, vol. 33, no. 7, pp. 1443–1457, 2015. View at: Publisher Site  Google Scholar
 M. Frassl, M. Angermann, M. Lichtenstern, P. Robertson, B. J. Julian, and M. Doniec, “Magnetic maps of indoor environments for precise localization of legged and nonlegged locomotion,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS '13), pp. 913–920, Tokyo, Japan, 2013. View at: Google Scholar
 M. Angermann, M. Frassl, M. Doniec, B. J. Julian, and P. Robertson, “Characterization of the indoor magnetic field for applications in localization and mapping,” in Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN '12), Sydney, Australia, November 2012. View at: Publisher Site  Google Scholar
 A. Wahdan, J. Georgy, and A. Noureldin, “Threedimensional magnetometer calibration with small space coverage for pedestrians,” IEEE Sensors Journal, vol. 15, no. 1, pp. 598–609, 2015. View at: Publisher Site  Google Scholar
 T. Ozyagcilar, Calibrating an eCompass in the Presence of Hard and SoftIron Interference, Freescale Semiconductor, 2015.
 J. M. G. Merayo, P. Brauer, F. Primdahl, J. R. Petersen, and O. V. Nielsen, “Scalar calibration of vector magnetometers,” Measurement Science and Technology, vol. 11, no. 2, pp. 120–132, 2000. View at: Publisher Site  Google Scholar
 M. Butta and I. Sasada, “Sources of noise in a magnetometer based on orthogonal fluxgate operated in fundamental mode,” IEEE Transactions on Magnetics, vol. 48, no. 4, pp. 1508–1511, 2012. View at: Publisher Site  Google Scholar
 T. Ozyagcilar, Layout Recommendations for PCBs Using a Magnetometer Sensor, Freescale Semiconductor, 2015.
 B. Vidakovic and P. Müller, An Introduction to Wavelets, Springer, Berlin, Germany, 1999.
 A. Savitzky and M. J. E. Golay, “Smoothing and differentiation of data by simplified least squares procedures,” Analytical Chemistry, vol. 36, no. 8, pp. 1627–1639, 1964. View at: Publisher Site  Google Scholar
 D. L. Donoho, “Denoising by softthresholding,” IEEE Transactions on Information Theory, vol. 41, no. 3, pp. 613–627, 1995. View at: Publisher Site  Google Scholar  MathSciNet
 S. Butterworth, “On the theory of filter amplifiers,” Wireless Engineer, vol. 7, pp. 536–541, 1930. View at: Google Scholar
Copyright
Copyright © 2016 Wenhua Shao et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.