Next Article in Journal
Mapping Historical Data: Recovering a Forgotten Floristic and Vegetation Database for Biodiversity Monitoring
Next Article in Special Issue
Detecting Themed Streets Using a Location Based Service Application
Previous Article in Journal
Evaluation of Deterministic and Complex Analytical Hierarchy Process Methods for Agricultural Land Suitability Analysis in a Changing Climate
Previous Article in Special Issue
A Knowledge-Based Step Length Estimation Method Based on Fuzzy Logic and Multi-Sensor Fusion Algorithms for a Pedestrian Dead Reckoning System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Heading Estimation with Real-time Compensation Based on Kalman Filter Algorithm for an Indoor Positioning System

1
School of Computer Science and Technology, China University of Mining and Technology, Xuzhou 221116, China
2
School of Environmental Science and Spatial Informatics, China University of Mining and Technology, Xuzhou 221116, China
*
Author to whom correspondence should be addressed.
ISPRS Int. J. Geo-Inf. 2016, 5(6), 98; https://doi.org/10.3390/ijgi5060098
Submission received: 17 March 2016 / Revised: 26 May 2016 / Accepted: 6 June 2016 / Published: 20 June 2016
(This article belongs to the Special Issue Location-Based Services)

Abstract

:
The problem of heading drift error using only low cost Micro-Electro-Mechanical (MEMS) Inertial-Measurement-Unit (IMU) has not been well solved. In this paper, a heading estimation method with real-time compensation based on Kalman filter has been proposed, abbreviated as KHD. For the KHD method, a unified heading error model is established for various predictable errors in magnetic compass for pedestrian navigation, and an effective method for solving the model parameters is proposed in the indoor environment with regular structure. In addition, error model parameters are solved by Kalman filtering algorithm with building geometry information in order to achieve real-time heading compensation. The experimental results show that the KHD method can not only effectively correct the original heading information, but also effectively inhibit the accumulation effect of positioning errors. The performance observed in a field experiment performed on the fourth floor of the School of Environmental Science and Spatial Informatics (SESSI) building on the China University of Mining and Technology (CUMT) campus confirms that apply KHD method to PDR(Pedestrian Dead Reckoning) algorithm can reliably achieve meter-level positioning using a low cost MEMS IMU only.

1. Introduction

Heading estimation is one of the key problems in the algorithm of pedestrian dead reckoning, and the accuracy of orientation estimation generates direct impact on the results of position calculation. It is considered as a difficult problem in indoor positioning to obtain accurate information from the IMU sensors with low cost and low precision [1,2].
Essentially, error accumulation of heading is the inherent defect of any pedestrian dead reckoning (PDR) algorithm based on MEMS IMU, which can be reduced by high-precision IMU. However, MEMS is often the only choice from the perspective of energy consumption, price, weight and so on. A variety of solutions were put forward by researchers, in order to reduce the accumulated error of MEMS during positioning. Afzal et al. [3] used Multiple Magnetometer Platform (MMP) to remove magnetic anomalies which caused by electronic devices and ferrous materials, thereby gaining reliable heading data. Wang et al. [4] used particle filter and map aiding method, thereby gaining meter level positioning accuracy. Zhang et al. [5] integrated visual and inertial data to realize localization, the visual data was captured from mobile phone camera and used image matching to achieve positioning. Gusenbauer et al. [6] collected pedestrian movement data for machine learning, so as to analyze the corresponding gait and step length, experiments showed that accumulated error was only 2.76% after walking 233 meters. Robertson et al. [7] established the pedestrian movement model through tying IMU to the feet of pedestrian to detect the movement state of IMU, and conducted estimation and feedback compensation to the error of navigation parameters and device based on EKF, so as to improve the accuracy and stability of positioning algorithm.
Although most existing methods may get good positioning results, they need additional information such as magnetic field and image, which can not only be easily influenced by external environment, but also increase the power consumption and volume of the system. For example, geomagnetic fingerprint information needs to be collected by a mobile phone in advance in the positioning condition, and then used for positioning. Meanwhile, most positioning algorithms need large data calculation, which is only suitable for post processing analysis, for example, the processing algorithms after map matching is conducted by particle filter, etc.
Orientation constitutes a key link in the positioning system. A number of fusion orientation estimation methods have been developed based on accelerometer, gyroscope and magnetometer [8,9,10]. These methods can improve the accuracy of the direction of walk to some extent, but with the accumulation of time, the direction error will become larger. In this paper, a real-time orientation correction algorithm is proposed. The orientation will be revised after each turn based on Kalman filter in the regular building environment. The map is measured in advance, rather than generated by simultaneous localization and mapping (SLAM). Our algorithm should be used in the premise that a precise indoor map has already been obtained. Comparing with some other methods based on the pure map constraint [11], this method can more accurately reflect the small changes in the direction of pedestrian gait, thereby achieving better positioning accuracy in the application of PDR algorithm. Detailed analysis and research on this method were conducted below. First of all, a unified heading error model is established for various errors of magnetic compass in application of pedestrian navigation. Gyroscope data is used to judge whether it is straight line movement or making a turn. Five parameters of heading error model are calculated by building geometric information through Kalman filtering method. Then, the five parameters are substituted into the model to calculate the predictable heading error of magnetic compass, thereby calculating the real-time heading information after error compensation. Experiments show that the proposed method of calculating real-time heading compensation can achieve accurate error model parameters training in indoor environment with regular structure, here regular structure refers to a number of straight corridors in the indoor structure. The direction of walk in the corridor basically remains stable, so that the direction of walk can be subject to filtering constraint by using the known direction of a corridor. This method effectively improves the original heading information, inhibits the accumulation effect of positioning error, and meets the needs of real-time pedestrian navigation.
This paper is organized as follows: In Section 2, the construction process of heading error model is described. In Section 3, a real-time heading compensation algorithm based on Kalman filter is proposed; meanwhile, the real-time heading correction algorithms based on assistance with building geometry information and least square are given, in order to facilitate comparative analysis. Subsequently, several experiments are analyzed in Section 4, and Section 5 concludes the paper.

2. Error Analysis of Orientation Sensing Data

Data of magnetic compass is likely to be influenced by many factors, such as human activities, materials of indoor space and peripheral electronic equipment. In stationary state, the magnetic compass has a probability of 90% generating the error of up to 15° [12]. The disadvantage of magnetic compass lies in that the magnetic induction axis will detect any interference magnetic field superimposed on geomagnetic field. Such interference is derived from the environment and platform itself, which can generate various errors. These errors can be divided into two major categories: predictable error and unpredictable error. The predictable error is mainly derived from the behaviors of carrying platform and pedestrians, such as soft or hard iron effect, platform tilt, installation misalignment and shaking when the user walks. The unpredictable error is mainly derived from the magnetic interference in the environment, especially in indoor environment. Most of the predictable errors can be eliminated by static calibration process and real-time dynamic compensation algorithm. However, it is difficult to avoid the unpredictable error, so that in the indoor environment with a large number of ferromagnetic materials, reading data of magnetic compass is unavailable because of much magnetic interference, which seriously hampers the application of magnetic compass in personal navigation.
Literature [13] conducted detailed analysis of the definition, modeling and impact characteristics on magnetic compass readings of various predictable errors, including seven kinds of errors such as magnetic declination, hard and soft iron effect, scale factor, fixed bias, platform tilt, installation misalignment and shaking when the user walks. Meanwhile, corresponding methods to reduce the error for each predictable error were put forward.
Magnetic declination means the angle between magnetic north and geographic north pole, positive for declining to the east and negative for declining to the west. The corresponding magnetic declination is different at different places or different time at the same place. In most parts of China, magnetic declination is between [−10, +2] degree. In the application of indoor positioning, the geomagnetic declination was set to be a constant λ according to the region located, by which the geomagnetic declination of Xuzhou was calculated to be 4°35´ in 2015.
The hard iron effect is caused by the permanent magnets and magnetic objects in the vicinity of the magnetic compass. It can be approximated as a constant component in a certain time because of its slow change. That is equivalent to that a constant component is superposed on the magnetic flux reading in the direction of the magnetic compass. This type of error is usually regarded as a fixed bias C b = ( C b x , C b y , 0 ) T . In general, hard iron effect should be eliminated by the built-in calibration procedure of the compass, and little residual effect is kept after calibration.
Soft iron effect results from the interaction between geomagnetic field and ferromagnetic materials around the compass. The difference with the hard iron effect lies in that the magnetic field generated by soft iron effect is different in different directions, which is equivalent to that a changing magnetic field is superimposed on the magnetic field. Such kind of error can be modeled into the combination of scale factor and rotation angle, which is expressed as follows:
C s = [ 1 + a x x a x y a x z a y x 1 + a y y a y z 0 0 1 ]
The a i j terms refer to the effective soft iron coefficients. They are the constants of proportionality between the magnetic field applied to a soft iron and the resulting induced magnetic field.
Errors of scale factor and fixed bias belong to the instrument error of sensor, which were classified as soft iron and hard iron effect respectively due to similar characteristics [14].
The heading is calculated by magnetic compass through measuring the horizontal component of the geomagnetic field. When the platform is tilted, the vertical component of the geomagnetic field will be projected to the induction axis of the compass, which will cause large deflection error. Therefore, platform tilt error modeling aims to achieve rotation from horizontal coordinate system to platform coordinate system:
R L B = [ cos φ sin φ sin θ sin φ cos θ 0 cos θ sin θ sin φ cos φ sin θ cos φ cos θ ]
Where, φ refers to the platform's angle of pitch; θ refers to the platform's roll angle, as shown in Figure 1.
Installation misalignment error refers to the deviation in the forward direction of vehicle coordinate system and the true walking direction of the pedestrian in the process of installing navigation system. Such kind of error is modeled as a constant β .
Finally, it is difficult to avoid and predict the moving pedestrian’s jitter error. In the process of movement, the device will inevitably present a certain vibration along with the jitter of the user’s body. Given the randomness of the error, it is usually modeled as ω ~ N ( 0 , σ 2 ) , of which size of σ 2 is related to the pedestrian’s movement speed, movement habits and other characteristics.
Combined modeling was conducted for the above-mentioned error models. The actual observed value     M b = ( M b x , M b y , M b z ) T of magnetic compass in vehicle coordinate system can be expressed as [15]:
M b = R L B ( C s M h + C b )
where,     M h refers to the vector of local geomagnetic field;     C s refers to the error factor of soft iron effect;     C b refers to the error factor of hard iron effect; R L B refers to the tilt error matrix from horizontal coordinate system to vehicle coordinate system.
The error models are substituted into formula (3), thereby obtaining the reading expression of magnetic compass induction axis; a unified model containing all predictable errors can be obtained through formula conversion. Literature [15] simplified the complex error calibration method based on magnetic field domain as the solution of five parameters based on heading domain, in order to simplify the complexity of algorithm. The simplified expression below was derived to make an approximate determination of the heading error, which is defined as follows:
δ = A + B sin ξ + C cos ξ + D sin 2 ξ + E cos 2 ξ + ω
where, δ refers to the deviation in direction, ω refers to the Gauss noise of gait direction, ξ refers to the heading value output from the magnetic compass; A~E represent the coefficients of the model needing to be calibrated.

3. Real-Time Heading Correction Algorithm

In order to verify the performance of real-time heading compensation algorithm based on Kalman filtering, the real-time heading compensation algorithms based on assistance with building geometry information and least square are given to facilitate comparative analysis.
PDR algorithm is mainly composed of the following three steps: gait detection, step length evaluation, direction calculation. The process is as follows: The accelerations acci captured form phone are transformed from the Body frame (B) into the Navigation frame (N) using the rotation matrix: a c c i N = R B N · a c c i B , as the Figure 2 shows, the coordinate system of the pedestrian's mobile phone is B-frame, and the coordinate system of the pedestrian's walking plane is Navigation frame; then, computing the accelerometer magnitude: a c c _ m a g = a c c X 2 + a c c Y 2 + a c c Z 2 , where accX, accY and accZ are the tri-axis acceleration in the navigation frame after removing the influence of gravity. And then the value of a c c _ m a g is used as the gait detection. The FIR filter algorithm [16] is utilized to implement the low-pass filter-based gait detection method according to the peaks and valleys. The step length calculation formula is L k = K · a c c m a x a c c m i n 4 [17], where L k is the the k t h step length. The coefficient K can be calibrated for different walking styles. a c c m a x and a c c m i n are the minimum and maximum amplitudes of the acceleration. The direction of walk can be calculated through the fusion of magnetic meter, accelerometer and gyroscope. Finally, the pedestrians can be positioned by formula (5),
X i + 1 = X i + S L i × sin α i Y i + 1 = Y i + S L i × cos α i
where α indicates the heading angle, SL refers to the step length and (X,Y) donates the coordinates of the position.

3.1. Map-Aided Heading Correction

The walking direction of pedestrian may be known through the gyroscope or magnetometer in our mobile phones. However, the angle acquired by gyroscope has a large accumulated error, and the angle acquired by magnetometer is susceptible to interference from external magnetic fields. In view of this, Kang et al. [8] presented a positioning method in the weighted fusion of gyroscope and magnetometer as detailed in Formula (6) below:
h k = ( 1 W ) ( h k 1 + w k d t ) + W h m a g , k
In this Formula, h k and h k 1 represents the direction value in the fusion calculation of the current moment and the previous moment; W represents the weight; W k represents the angular velocity acquired by gyroscope at the current moment; h m a g , k represents the direction value acquired by magnetometer at the current moment. Although fusion calculation improves the accuracy of direction to certain extent, the increase in direction error is still inevitable as time goes on. As the map information is known in advance when conducting positioning, it is natural to constrain the heading by using map geometry information.
As shown in Figure 3, the three regions marked with red circles are non-linear regions, namely BZ, AZ and CA. Within such regions, users generally turn to walk or move around. In the three linear regions labeled as C, B and A in the corridor, users usually walk in a straight line.
The cumulated value S G y r of gyro data is used to judge the movement attributes of the users who are moving, including turning a corner and walking in a straight line. The judgment condition for turning a corner is:
S G y r k * S G y r k 1 > 0   and   a b s ( S G y r k ) > 10
S G y r k and S G y r k 1 refer to the cumulative values of gyro for the current step and previous step, respectively. Figure 4 shows the cumulated value of the gyro corresponding to each step during the movement. The three extreme points within rectangular boxes represent three turning movements, as shown in Figure 5. Therefore, when the accumulated value of the gyro does not meet formula (7), the user can be basically identified as walking in a straight line.
There are usually three acceleration extreme values in a gait, including two troughs and one peak. The direction value of such gait is the mean direction value of such three acceleration extreme values. During the gait detection, additive value of gyro angle variables can be used to determine the user's movement properties (turn or straight). If the user is within the linear region (such as C, A, B and Z), direction angle of the region can be determined according to the self-adaptation of the mobile phone's direction data (such as 125°, 90°, 0° and 270°), and the geometric direction angle is used as the heading; otherwise it indicates that the user is within the nonlinear region (such as CA, AZ and BZ), the direction average in the complete gait is directly used as the heading angle.

3.2. Heading Error Correction Based on Least Square

Literature [15] used the outdoor GPS data to solve the parameters of heading error model by virtue of online training mode. However, this method requires the user to be outdoors, and the navigation system must be started in the open area to obtain good GPS observed value, otherwise the relatively accurate error model parameters cannot be obtained. Given the randomness of the user's adoption of navigation system, the indoor navigation system can be started freely in the indoor environment. Because the geometric information of the indoor building is known, this paper presents a new method of real-time heading compensation based on least square by virtue of such information.
The five calibration parameters in formula (4) can be solved after obtaining the reference heading from the map geometry information as well as obtaining the original heading data from the magnetic compass. Theoretically, the five calibration parameters in formula (4) can be solved as long as more than 5 sets of heading data are obtained. In this paper, 10 sets of gait heading data are used to seek the parameters of the error model at each walking in a straight line, and then the model parameters will be sought again for every turning a corner. The solving process is as follows:
ξ = ( ξ 1 , ξ 2 , ... ξ i , ... ξ n ) T
Assume that in the process of the calibration, the original heading of the magnetic compass is: where ξ i refers to the direction value obtained from the sensor for each time. Specific to PDR, it refers to the direction value of each step obtained from the sensor.
The corresponding reference heading is:
ξ = ( ξ 1 , ξ 2 , ... ξ i , ... ξ n ) T
Specific to PDR, ξ i refers to the reference direction value of each step, and it refers to the direction value of the actual corresponding corridor in this experiment.
These parameters can be determined by following formula:
[ A B C D E ] = ( Q T . Q ) 1 Q T . ( ξ ξ )
where
Q = [ 1 sin ξ 1 cos ξ 1 sin 2 ξ 1 cos 2 ξ 1 1 sin ξ i cos ξ i sin 2 ξ i cos 2 ξ i 1 sin ξ n cos ξ n sin 2 ξ n cos 2 ξ n ]
After the completion of the calibration, the real-time heading error can be estimated and eliminated. However, the estimated residuals are mostly derived from the Gauss noise caused by the pedestrian's jitter, which can be reduced by Kalman filter and so on, namely the method proposed in Section 3.3.

3.3. Real Time Heading Compensation Based on Kalman Filter

Similar to the heading compensation principle described in Section 3.2, this section proposes a kind of heading estimation method based on Kalman filter real-time compensation. This method designs the Kalman filter by taking coefficients (A,B,C,D,E) in heading error model (4) as the state variables of the system and taking the heading error value as the measured vector of the system, conducting real-time estimation of the heading error. Based on the analysis above, complete real-time heading error compensation course based on Kalman filter algorithm was given in Appendix.
Several key variables of Kalman filter is designed as follows,the state vector is defined as the five calibration coefficients in formula (4):
X = [ A , B , C , D , E ] T
The equation of state is defined as:
X k + 1 = X k + W k
The measurement vector is defined as:
Z = [ F P H O r i H ]
The FPH represents the actual heading obtained from the building geometric direction and the OriH is the original heading value coming from the cellphone reading. State vector coefficient is defined as:
H = [ 1 sin ξ 1 cos ξ 1 sin 2 ξ 1 cos 2 ξ 1 1 sin ξ i cos ξ i sin 2 ξ i cos 2 ξ i 1 sin ξ n cos ξ n sin 2 ξ n cos 2 ξ n ]
Actually, H is the extraction matrix. Selection of initial state vector: X 0 = [ 0 , 0 , 0 , 0 , 0 ] T ; state vector estimation variance matrix P is set to be the diagonal matrix with the value for the diagonal elements of 1000; dynamic noise matrix Q is set to be the diagonal matrix with the value for the diagonal elements of 0.0001; measurement noise matrix R is set to be the diagonal matrix with the value for the diagonal elements of 0.0001. Basically, training of the first 10~15 gait heading data for straight line motion meets the convergence requirements.
P is set based on the experience. It is generally set to be a large value, so as to guarantee the algorithm convergence. In this paper, it is set to be a matrix with the initial value of 1000 for 5 × 5 diagonal elements. As can be seen from Figure 6, the diagonal element value of P decreases rapidly and then tends to be stable for the first 5 steps. It corresponds to the elements of state vector X in Figure 7, namely change between two adjacent states is relatively small after 5 steps.

4. Experiment

A test field has been constructed on the fourth floor of the School of Environmental Science and Spatial Informatics (SESSI) building in China University of Mining and Technology (CUMT) with the selection of Samsung Galaxy Note3 as the mobile testing device. The phone's built-in IMU is MPU 6050, which includes 3-axis accelerometer, gyroscope and magnetometer. Its sampling frequency is 100HZ. In the experiment, a pedestrian walks from the westernmost C area to B area passing A area at a constant speed. In the walking process, the pedestrian holds his mobile phone steadily at level, walking a total of 314 steps.
The four direction calculation methods are compared: in the first method, the direction value is acquired by original direction sensor of mobile phone, denoted as OHD; in the second method, the direction error is restricted by map matching, denoted as GHD; in the third method, real-time compensation is made for direction error based on the least squares algorithm, denoted as LHD; in the fourth method, real-time compensation is made for direction error based on Kalman filtering algorithm, denoted by KHD.

4.1. Analysis of Heading Error

The pedestrian walks along the corridor specified by arrow in Figure 5 from the westernmost of Zone C on the fourth floor of the SESSI building. According to the geographic direction, heading angle turns from 125° to 90°, then from 90° to 0°, and then from 0° to 270°.
Figure 8 shows the results of heading calculation of various algorithms. Table 1 further lists the heading error information of various algorithms. Independent analysis are conducted for the heading of four straight lines, and Table 1 shows that: the mean error of KHD algorithm is 36.3%, 15.7%, 16.9% and 57.8% that of OHD respectively; the maximum heading error is 30.7%, 23.7%, 20.8% and 88.9% that of OHD respectively, and the minimum absolute error is within 0.3°. The angle error of LHD algorithm is between those of KHD and OHD.

4.2. PDR-Based Positioning Trajectory Analysis

Four PDR algorithms, namely OHPDR, LSMPDR, KHPDR and GEPDR were defined, respectively, according to the above proposed four directions of OHD, LHD, KHD and GHD.
The walking trajectory predetermined is marked as Ground True, and the starting position is set with the error of about 2 m which is determined by the results of WIFI positioning from the true position. Figure 9 shows the calculation trajectory of the four solutions. Figure 10 and Table 2 show the positioning errors arising in the above four solutions.
The trajectory of OHPDR is in red, as shown in Figure 9. Within the range of the first 200 steps or so, the error has been accumulated from the initial 2.56 m to 22.67 m. Subsequently, the error is slightly decreased, but the mean error reaches 12.03 m. Because of the heading error, this solution completely deviates from the true trajectory.
The trajectory of GEPDR is in blue. The walking direction value will be matched to the four known directions automatically according to the smallest difference method, just as in this experiment (such as 125°, 90°, 80° and 270°). The trajectory obtained through this approach is almost consistent with the geometry of the corridor, but compulsive direction constraints may make the walking trajectory different in a whole or even “through-wall”. In this experiment, the mean positioning error of the method is 3.52 m.
The trajectory of LSMPDR is in green. This method adopts the first ten steps in each straight gait as the direction training data, and uses the least squares algorithm for error solution and real-time compensation. In the experiment, the mean positioning error of this method is 4 m, and the maximum error of only 5.97 m, indicating that this method reduces the cumulative error to a certain extent.
The trajectory of KHPDR is in pink. The positioning result of this method is the best one among the four methods. The mean positioning error is controlled within about 2 m, and it does not change sharply with the extension of the positioning time. Compared with the other three methods, this method significantly reduces the error in the mean value, minimum value and maximum value, decreased by 80.7%, 34.5% and 47.8%; 87.5%, 85.1% and 86.3%; 83.1%, 27.3% and 35.6% respectively.

4.3. Comprehensive Error Analysis Based on the Four PDR Algorithms.

Comprehensive error analysis was conducted in C–B area, B-C area on the 5th floor and a rectangular corridor area on the 3rd floor. There were 4 boys and 2 females who participated in the experiment. The average age is 23 years old. Two males hold the height of about 1.80 m, about 1.75 m for another two males. One female holds a height of 1.62 m and the other one holds a height 1.58 m. In each experimental area, each person walked two times on average. All persons held mobile phones horizontally, and walked in normal gait. There were three obvious right turns from area B to C, three obvious left turns from area C to B, and three right turns with right angles in the trajectory on third floor. Standard deviation of the positioning error and root mean square deviation of the positioning results were recorded. Figure 11, Figure 12 and Figure 13 show a walking trajectory.
From Table 3, Table 4 and Table 5, we can see that the KFPDR method has the highest precision in general. As for the GHPDR method followed KFPDR in precision, there are two points to note:
(1) When the direction is fixed to the geometric direction, it itself will bring a certain error, because the actual direction of walk is only close to the geometric direction, so that this error will be amplified after accumulation for a long time.
(2) When the direction error of original gait is too large (see the circles in Figure 11), the geometric constraint directly constrains the step direction to the horizontal left (See the circles in Figure 12 for details), resulting in deviation in overall trajectory and increase in the positioning error.
For the LSMPDR method, it is a kind of global optimization, without taking into account the correlation between adjacent data. This is exactly the advantages of Kalman Filter method. Therefore, the positioning accuracy is only higher than OHPDR algorithm.
In addition, a new experiment was conducted in order to verify the effectiveness of the algorithm, namely turned a circle at the corner with right angle in the rectangular experimental area on third floor and then continued to move forward. Experimental results are shown in Figure 14:
As shown in Figure 14, the trajectory of algorithm OHPDR held maximum deviation from the true value because any optimization was not conducted in the direction. Algorithm GEPDR held relatively smooth trajectory, but had large whole deviation; especially at the corner, the true circle was bound into a small rectangle. Algorithm KHPDR was the most close to the true trajectory and algorithm LSMPDR was slightly inferior in algorithm KHPDR.

5. Conclusions

The method proposed in this paper takes the gait heading data under walking in a straight line as the basic data used for training the error model parameters. For every turning, the parameters are retrained when restarting walking in a straight line, so as to improve the accuracy of heading estimation as well as get control well the heading error. Because of its continuous learning function, the accuracy of the heading estimation can be improved, and the accumulation effect of PDR positioning error can be effectively inhibited. The method proposed in this paper is also applicable to the outdoor. In the case of known map, the straight paths whose directions have been determined in the map can be used to constrain the orientation. If the user walks like zigzag style, this algorithm cannot realize constraints by using the geometric direction of building. The parameters of error model can be calculated by using Kalman filtering algorithm only in the case that 10 successive steps of the direction of walk are kept stable, which can be used to calculate the heading error and conduct real-time compensation for heading. The parameters of error model can be calculated again until the next turn and stable direction values of ten steps are got once again. Future research directions can be conducted from the following three aspects:
(1) Positioned in pocket or pouch is one of our research interests in the future, which needs more complex direction transformation method and more stable step length and gait identification method. Currently, horizontal stability must be maintained as soon as possible.
(2) The current direction filtering assumes that the users move forward along straight line after turning, and constrains are conducted by known geometric direction of the building. Further work should consider random movement of users, and detect the state of motion through algorithm, of which direction constraint is not conducted; direction filtering calculation should be conducted again when the direction of walk is consistent with the geometric direction of the building once again.
(3) Constraints can be conducted by using straight corridors, so constraints by curved sides can also be studied, such as curved tunnel and curved roadway, which need to conduct further study on the vectorization technology of map.

Acknowledgments

This work was funded by Key Laboratory of Satellite Mapping Technology and Application, National Administration of Surveying, Mapping and Geoinformation.

Author Contributions

The corresponding author Xin Li proposed the research, organized the entire experimental program, and drafted the manuscript. Jian Wang and Chunyan Liu performed the data analysis and were involved in the writing of the manuscript.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix

Algorithm 1. [sigma, heading] = heading_estimation (FP_Ori, ori, Sgyr).
Input: FP_Ori: building geometric direction; ori: the original heading value; Sgyr: Gyro value of Z axis accumulated between a step.
Output: heading: Heading value calculated
1.  i = 0; j = 1; flg_Turn = 0; count_T = 0; X = []; Ori_para = []
2.  Take the direction value of current gait, i++
3.   If i = 1
4.     heading(i) = ori(i); sigma(i) = 1000
5.     If Sgyr(i) < 10
6.      flg_Turn = 0; Ori_para(j) = ori(i); j = j + 1
7.     Else
8.      flg_Turn = i; count_T = count_T + 1
9.     End
10.   Else
11.  flg_gyr = Sgyr(i) * Sgyr(i-1);
12.   If flg_gyr > 0 && abs(Sgyr(i)) > 10
13.    flg_Turn = i; count_T = count_T + 1;sigma(i) = 1000; heading(i) = ori(i);
14.     If count_T > 1
15.     X = []; Ori_para = []; j = 1;
16.    End
17.   Else
18.     flg_Line = i;
19.     If (flg_Turn==0||(count_T > 1)) &&(flg_Line - flg_Turn)>0 &&(flg_Line - flg_Turn)<10
20.      Ori_para(j) = ori(i); j = j + 1;
21.      If length(Ori_para)>=9
22.       er_Ori = abs(FP_Ori - mean_Ori_para); [miner_Ori,dex] = min(er_Ori);
23.       If miner_Ori < 15
24.        flg_KF = 1; Z = zeros(length(Ori_para),1); ori_dex = FP_Ori(dex);
25.        For im = 1:length(Ori_para)
26.         Z(im) = FP_Ori(dex) - Ori_para(im);
27.        End
28.       Else
29.        flg_KF = 0;
30.       End
31.       If flg_KF == 1
32.        [H, P, R] = Get_Para(Ori_para);
33.        X = Heading_Para(H, P, R, Z);
34.       End
35.       Ori_para = [];
36.       j = 1;
37.      End //line 21
38.     End /line 19
39.     If ~isempty(X)
40.      sigma(i) = X(1) + X(2)*sin(ori(i)*(pi/180)) + X(3)*cos(ori(i)*(pi/180)) + X(4)*sin(2*ori(i)*(pi/180)) + X(5)*cos(2*ori(i));
41.      heading(i) = ori(i) + sigma(i);
42.     Else
43.      heading(i) = ori(i);sigma(i) = 1000;
44.     End
45.   End //line 10
46.End //line 3
47. Goto 2
flg_Turn in the algorithm is used to mark the turn state; flg_Line is used to mark the straight state; count_T is used to count the turn; variable X is used to save the filter state vector; Ori_para is used to record the direction data of 10 gaits of the filter; sigma is used to save the direction error of each gait. The gait direction error used for filter and turn is set to be 1000, and the direction error of other gaits is calculated by Kalman filter.
Line Line 3–10 represent the processing of initial gait; line 12–17 represent if the gait turns, X and Ori_para arrays will be emptied; line 19–38 represent if data of 10 successive straight gaits is found after turned, difference between the direction value of the gait and geometric direction value set is used as the observation value Z. See line 22–28 for selection of geometric direction values, namely select a direction closest to the current direction value from all the geometric direction values set. Line 32–33 performs filtering calculation after obtaining relevant parameters of Kalman filter. For subsequent straight gaits, direction error can be calculated by using the filtering results, and compensate for the current gait direction; see details in line 40–41.

References

  1. Chintalapudi, K.; Padmanabha Iyer, A.; Padmanabhan, V.N. Indoor localization without the pain. In Proceedings of the Sixteenth Annual International Conference on Mobile Computing and Networking, Chicago, IL, USA, 20–24 September 2010; pp. 173–184.
  2. Shum, K.C.Y.; Cheng, Q.J.; Ng, J.K.Y.; Ng, D. A signal strength based location estimation algorithm within a wireless network. In Proceedings of the IEEE International Conference Advanced Information Networking and Applications (AINA), Singapore, Singapore, 22–25 March 2011; pp. 509–516.
  3. Afzal, H.; Renaudin, V.; Lachapelle, G. Assessment of indoor magnetic field anomalies using multiple magnetometers. In Proceedings of the 23rd International Technical Meeting of The Satellite Division of the Institute of Navigation, ION GNSS10, Portland, OR, USA, 21–24 September 2010; pp. 1–9.
  4. Li, X.; Wang, J.; Liu, C.; Zhang, L.; Li, Z. Integrated WiFi/PDR/Smartphone using an adaptive system noise extended Kalman filter algorithm for indoor localization. Int. J. Geo-Inf. 2016, 5. [Google Scholar] [CrossRef]
  5. Zhang, B.; Teng, J.; Zhu, J.; Li, X. Ev-loc: Integrating electronic and visual signals for accurate localization. In Proceedings of the Thirteenth ACM International Symposium on Mobile Ad Hoc Networking and Computing, Hilton Head, SC, USA, 11–14 June 2012; pp. 25–34.
  6. Gusenbauer, D.; Isert, C.; Krösche, J. Self-contained indoor positioning on off-the-shelf mobile devices. In Proceedings of the Indoor Positioning and Indoor Navigation (IPIN), Zurich, Switzerland, 15–17 September 2010; pp. 1–9.
  7. Robertson, P.; Angermann, M.; Krach, B. Simultaneous localization and mapping for pedestrians using only foot-mounted inertial sensors. In Proceedings of the 11th International Conference on Ubiquitous Computing, Orlando, FL, USA, 30 September–3 October 2009; pp. 93–96.
  8. Kang, W.; Korea, D.; Nam, S.; Han, Y.; Le, S. Improved heading estimation for smartphone-based indoor positioning systems. In Proceeding of the 2012 IEEE 23rd International Symposium on Personal Indoor and Mobile Radio Communications (PIMRC), Sydney, Australia, 9–12 September 2012; pp. 2449–2453.
  9. Roetenberg, D.; Luinge, H.J.; Baten, C.T.; Veltink, P.H. Compensation of magnetic disturbances improves inertial and magnetic sensing of human body segment orientation. IEEE Trans. Neural Syst. Rehabil. Eng. 2005, 13, 395–405. [Google Scholar] [CrossRef] [PubMed]
  10. Zhang, R.; Reindl, L.M. Inertial localization system using unscented kalman filter for 3D positioning. In Proceedings of the 2011 4th International Congress on Image and Signal Processing (CISP), Shanghai, China, 15–17 October 2011; pp. 2669–2673.
  11. Borenstein, J.; Ojed, L. Heuristic drift elimination for personnel tracking systems. J. Naivgation 2010, 63, 591–606. [Google Scholar] [CrossRef]
  12. Vasconcelos, J. F.; Elkaim, G.; Silvestre, C.; Oliveira, P. A geometric approach to strapdown magnetometer calibration in sensor frame. Navigation Guid. Control Underw. Veh. 2008, 2, 1–11. [Google Scholar] [CrossRef]
  13. Chen, W.; Chen, R.; Chen, Y.; Kuusniemi, H.; Wang, J.; Fu, Z. An Adaptive Calibration Approach for a 2-Axis Digital Compass in a Low-Cost Pedestrian Navigation. In Proceedings of the IEEE International Instrumentation and Measurement Technology Conference (I2MTC), Austin, TX, USA, 3–6 May 2010; pp. 1392–1397.
  14. Jiménez, A.R.; Zampella, F.; Seco, F. Improving inertial pedestrian dead-reckoning by detecting unmodified switched-on lamps in buildings. Sensors 2014, 14, 731–769. [Google Scholar] [CrossRef] [PubMed]
  15. Chen, W.; Chen, R.; Chen, Y.; Kuusniemi, H.; Wang, J.; Fu, Z. An effective pedestrian dead reckoning algorithm using a unified heading error model. In Proceedings of the IEEE/ION Position, Location and Navigation Symposium (PLANS) 2010, Indian Wells, CA, USA, 4–6 May 2010; pp. 340–347.
  16. Li, F.; Zhao, C.; Ding, G.; Gong, J.; Liu, C.; Zhao, F. A reliable and accurate indoor localization method using phone inertial sensors. In Proceedings of the 2012 ACM Conference on Ubiquitous Computing, Pittsburgh, PA, USA, 5–8 September 2012; pp. 421–430.
  17. Fang, S.H.; Lin, T.N. Indoor location system based on discriminant-adaptive neural network in IEEE 802.11 environments. IEEE Trans. Neural Netw. 2008, 19, 1973–1978. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Schematic diagram of the angle.
Figure 1. Schematic diagram of the angle.
Ijgi 05 00098 g001
Figure 2. Measurement setup. (a) Illustration of the two coordinate systems; (b) Test subject holding a phone.
Figure 2. Measurement setup. (a) Illustration of the two coordinate systems; (b) Test subject holding a phone.
Ijgi 05 00098 g002
Figure 3. Cartographic zoning plan.
Figure 3. Cartographic zoning plan.
Ijgi 05 00098 g003
Figure 4. Analysis on the accumulated gyro value.
Figure 4. Analysis on the accumulated gyro value.
Ijgi 05 00098 g004
Figure 5. Walking trajectory.
Figure 5. Walking trajectory.
Ijgi 05 00098 g005
Figure 6. Convergence of diagonal elements of covariance matrix P.
Figure 6. Convergence of diagonal elements of covariance matrix P.
Ijgi 05 00098 g006
Figure 7. Element change of state vector X.
Figure 7. Element change of state vector X.
Ijgi 05 00098 g007
Figure 8. Heading estimation.
Figure 8. Heading estimation.
Ijgi 05 00098 g008
Figure 9. Positioning trajectory analysis for different solutions associated with PDR.
Figure 9. Positioning trajectory analysis for different solutions associated with PDR.
Ijgi 05 00098 g009
Figure 10. Positioning error analysis for different solutions associated with PDR.
Figure 10. Positioning error analysis for different solutions associated with PDR.
Ijgi 05 00098 g010
Figure 11. Analysis on positioning trajectory (B–C) for four methods.
Figure 11. Analysis on positioning trajectory (B–C) for four methods.
Ijgi 05 00098 g011
Figure 12. Enlarged view of map constraint error.
Figure 12. Enlarged view of map constraint error.
Ijgi 05 00098 g012
Figure 13. Analysis on positioning trajectory (rectangular corridor on the 3rd floor) for four methods Standard deviation of the positioning error and root mean square deviation of the positioning results were recorded for three groups of experiments.
Figure 13. Analysis on positioning trajectory (rectangular corridor on the 3rd floor) for four methods Standard deviation of the positioning error and root mean square deviation of the positioning results were recorded for three groups of experiments.
Ijgi 05 00098 g013
Figure 14. Positioning trajectory analysis for different solutions associated with PDR.
Figure 14. Positioning trajectory analysis for different solutions associated with PDR.
Ijgi 05 00098 g014
Table 1. Comparative analysis for heading estimation error based on different methods.
Table 1. Comparative analysis for heading estimation error based on different methods.
Mean Error (Degrees)Max. Error (Degrees)Min. Error (Degrees)
OHDLHDKHDOHDLHDKHDOHDLHDKHD
125°16.346.085.9527.1211.218.320.750.680.25
90°7.894.561.2513.2312.153.120.560.230
13.127.252.2325.3621.255.240.250.190
270°8.396.564.8732.2531.5628.960.350.180.12
Table 2. Positioning error analysis for different solutions associated with PDR.
Table 2. Positioning error analysis for different solutions associated with PDR.
OHPDRGEPDRLSMPDRKFPDR
Mini. error/m2.562.162.340.32
Mean error/m12.033.524.432.31
Max. error/m22.675.275.973.84
Table 3. Positioning analysis for different solutions associated with PDR in rectangular corridor on the 3rd floor.
Table 3. Positioning analysis for different solutions associated with PDR in rectangular corridor on the 3rd floor.
OHPDRGHPDRLSMPDRKFPDR
STDE/mRMSE/mSTDE/mRMSE/mSTDE/mRMSE/mSTDE/mRMSE/m
10.79418.210.0442.680.1146.350.0472.63
20.74517.430.0352.550.1076.260.0432.54
30.76317.390.0392.660.0986.070.0422.57
40.72917.240.0322.490.0865.940.0362.44
50.73617.350.0372.520.0996.090.0452.59
60.78518.010.0422.620.1096.320.0462.60
Table 4. Positioning analysis for different solutions associated with PDR in B–C area on the 5th floor.
Table 4. Positioning analysis for different solutions associated with PDR in B–C area on the 5th floor.
OHPDRGHPDRLSMPDRKFPDR
STDE/mRMSE/mSTDE/mRMSE/mSTDE/mRMSE/mSTDE/mRMSE/m
10.64314.860.0222.350.1045.750.0362.38
20.61714.420.0242.220.0985.480.0242.02
30.62714.520.0282.290.0995.650.0362.28
40.61814.390.0231.990.0945.370.0241.99
50.63214.560.0252.310.0985.470.0262.03
60.63814.650.0292.320.1025.680.0342.36
Table 5. Positioning analysis for different solutions associated with PDR in C-B area on the 5th floor.
Table 5. Positioning analysis for different solutions associated with PDR in C-B area on the 5th floor.
OHPDRGHPDRLSMPDRKFPDR
STDE/mRMSE/mSTDE/mRMSE/mSTDE/mRMSE/mSTDE/mRMSE/m
10.53413.390.0323.670.0944.660.0382.47
20.52912.990.0283.640.0874.630.0352.24
30.52813.190.0343.870.0894.650.0332.31
40.51612.870.0293.670.0864.580.0292.15
50.52412.890.0343.820.0924.640.0312.25
60.53613.400.0353.920.0984.700.0402.52

Share and Cite

MDPI and ACS Style

Li, X.; Wang, J.; Liu, C. Heading Estimation with Real-time Compensation Based on Kalman Filter Algorithm for an Indoor Positioning System. ISPRS Int. J. Geo-Inf. 2016, 5, 98. https://doi.org/10.3390/ijgi5060098

AMA Style

Li X, Wang J, Liu C. Heading Estimation with Real-time Compensation Based on Kalman Filter Algorithm for an Indoor Positioning System. ISPRS International Journal of Geo-Information. 2016; 5(6):98. https://doi.org/10.3390/ijgi5060098

Chicago/Turabian Style

Li, Xin, Jian Wang, and Chunyan Liu. 2016. "Heading Estimation with Real-time Compensation Based on Kalman Filter Algorithm for an Indoor Positioning System" ISPRS International Journal of Geo-Information 5, no. 6: 98. https://doi.org/10.3390/ijgi5060098

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