?

An improved particle filter indoor fusion positioning approach based on Wi-Fi/ PDR/ geomagnetic field

2024-03-20 06:43TinfWngLitoHnQioliKongZeyuLiChngsongLiJingweiHnQiBiYnfeiChen
Defence Technology 2024年2期

Tinf Wng , Lito Hn ,b,*, Qioli Kong ,b, Zeyu Li , Chngsong Li , Jingwei Hn ,Qi Bi , Ynfei Chen

a College of Geodesy and Geomatics, Shandong University of Science and Technology, Qingdao, 266590, China

b Key Laboratory of Geomatics and Digital Technology of Shandong Province, Shandong University of Science and Technology, Qingdao, 266590, China

Keywords:Fusion positioning Particle filter Geomagnetic iterative matching Iterative window Constraint window

ABSTRACT The existing indoor fusion positioning methods based on Pedestrian Dead Reckoning (PDR) and geomagnetic technology have the problems of large initial position error, low sensor accuracy, and geomagnetic mismatch.In this study,a novel indoor fusion positioning approach based on the improved particle filter algorithm by geomagnetic iterative matching is proposed, where Wi-Fi, PDR, and geomagnetic signals are integrated to improve indoor positioning performances.One important contribution is that geomagnetic iterative matching is firstly proposed based on the particle filter algorithm.During the positioning process,an iterative window and a constraint window are introduced to limit the particle generation range and the geomagnetic matching range respectively.The position is corrected several times based on geomagnetic iterative matching in the location correction stage when the pedestrian movement is detected, which made up for the shortage of only one time of geomagnetic correction in the existing particle filter algorithm.In addition, this study also proposes a real-time step detection algorithm based on multi-threshold constraints to judge whether pedestrians are moving,which satisfies the real-time requirement of our fusion positioning approach.Through experimental verification,the average positioning accuracy of the proposed approach reaches 1.59 m,which improves 33.2% compared with the existing particle filter fusion positioning algorithms.

1.Introduction

With the increase in people's indoor activity time and the increasingly complex internal structure of buildings, people's demand for Indoor Location Based Services (ILBS) [1,2] is becoming stronger.ILBS can serve indoor and underground environments[3-5],such as movement guidance,emergency evacuation,indoor pathfinding, indoor monitoring, etc., which plays a pivotal role in facilitating people's indoor life and maintaining the safety of closed public environments.Nowadays Global Navigation Satellite System(GNSS)has already realized high-precision outdoor positioning and navigation,which provides great convenience for people's outdoor travel [6].But the satellite positioning system cannot afford stable and high-precision positioning indoors because GNSS signals cannot penetrate buildings.Accordingly, indoor positioning technology has received more and more attention and has become a hotspot in the field of navigation and positioning.

In recent years, with the development of network communication and sensor technology, more and more indoor positioning solutions have emerged [7-9].Single high-precision indoor positioning technology costs a lot and is not suitable for the daily life of the public.Such as ultrasound [10], ultra-wideband (UWB) [11],light-emitting diodes [12], etc.require underlying hardware support or additional equipment deployment.Affected by the complex indoor environment, some high-precision indoor positioning technologies still have some limitations.For example, the positioning accuracy of Pseudo-Satellite technology [13] depends on the synchronization between Pseudo-Satellites and Global Navigation Satellite System (GNSS) satellites, and is susceptible to multipath interference; Infrared and Bluetooth positioning technologies [14] have the disadvantages of short signal propagation distance and easy to be interfered by the environment.A single low-overhead positioning technology has relatively poor positioning accuracy.Nowadays, almost all indoor public places are covered with Wi-Fi signals.Smartphones do not need to connect to Wi-Fi, but only need to obtain signal strength to achieve positioning[15].Wi-Fi signals have obvious spatial differences in a wide range of indoor environments, but they are vulnerable to human activities.Therefore, the time stability of Wi-Fi signals is poor,which leads to poor accuracy of Wi-Fi positioning.The distortion of the geomagnetic field as it passes through a reinforced concrete building creates a unique indoor magnetic field.When there is no structural change in the metal structure of the building,the indoor magnetic field is relatively stable.This allows geomagnetic data[16,17] to be used as a natural feature quantity for indoor positioning.Compared with Wi-Fi,geomagnetic signals are less affected by human activities and have better time stability.However,geomagnetic signals is not unique in a wide range of indoor environments, which makes it prone to mismatch during positioning.Pedestrian Dead Reckoning (PDR) is a positioning method that measures and counts the number of steps, step length, and direction of pedestrians, and calculates the location information of pedestrians.PDR is a kind of indoor inertial navigation method,which can still be used for positioning when the signals of smartphones are blocked.However, the PDR calculated based on the lowoverhead sensor of the smartphone has not only accumulated errors due to the influence of all kinds of sensor errors but also lacks the initial positioning location.Accordingly,PDR must be effectively combined with other absolute positioning technologies to realize positioning [18,19].Some scholars integrated PDR with Wi-Fi or absolute positioning technologies such as geomagnetic and Bluetooth for indoor positioning [20-22], and the particle filter (PF)algorithm is often used to improve the accuracy of fusion positioning[23,24].To reduce costs and improve the universality of the approach, this paper realizes indoor positioning based on Wi-Fi,geomagnetic and PDR without additional equipment deployment.

To overcome the non-unique phenomenon of geomagnetic fingerprints in large indoor environments, Shi et al.[25] used the PDR positioning results to establish an error model to control the generation of particles in the PF algorithm,reducing the possibility of geomagnetic mismatches.Li et al.[26]took the initial positioning error obtained by geomagnetic fingerprint matching as the maximum matching range of particles based on the point set matching idea of Hausdorff distance, effectively alleviating the divergence of PF.To improve the geomagnetic matching accuracy,a sequence matching method based on Dynamic Time Warping(DTW)was used for indoor geomagnetic positioning to improve the positioning accuracy.Qiu et al.[27] combined DTW and PF algorithms to achieve target tracking by increasing the number of matching features.Based on the traditional DTW algorithm, Chen et al.[28] proposed a three-dimensional Dynamic Time Warping(3D-DTW)algorithm to calculate the distance.The authors expand the original one-dimensional signal to two-dimensional and improve the positioning accuracy through the weighted least squares method.Song et al.[29] proposed an indoor fusion positioning method based on PF that integrates Wi-Fi, PDR, and geomagnetic field.In this algorithm,Wi-Fi is used to determine the initial position, PDR is used as the state transition equation of the particle, and the geomagnetic field is used to correct the positioning result.The geomagnetic three-axis data is used to calculate the weight of the particles instead of the geomagnetic modulus value, which improves the accuracy of fusion positioning.

To overcome the problem of Wi-Fi signal instability, Zhu et al.[30] realized positioning by Wi-Fi through an improved weighted centroid positioning approach.And they integrated Wi-Fi and PDR based on the Extended Kalman Filter(EKF)algorithm,which solved the problem of unstable Wi-Fi signal and large cumulative error of PDR;Y.Lu et al.[31]improved the Wi-Fi fingerprint matching result results based on the Random Sample Consensus (RANSAC) algorithm,which improved the initial accuracy and convergence rate of PF.Whether in independent PDR positioning or PF-based fusion positioning approach, improving the positioning accuracy of PDR has always been a hot topic.Putta et al.[32] combined the geomagnetic field and the spatial distribution of the indoor environment and used the gradient descent method to improve the heading of pedestrians to improve the positioning accuracy.Shao et al.[33] proposed a PF enhancement algorithm based on an improved magnetic field matching model, which effectively alleviated the influence of PDR motion estimation errors on the positioning results.

The accuracy of particle resampling has a significant impact on the PF fusion positioning results.Ning et al.[34] used the normal distribution method for particle resampling; Villacres et al.[35]proposed an improved particle resampling method based on reinforcement learning, which improved the positioning of the PF algorithm precision;Qian et al.[36]divided the positioning area into several sub-areas,which improved the accuracy of Wi-Fi matching at the initial location.The subranges were then included in the state vector using a PF augmentation algorithm.Finally, the clone selection algorithm was used to improve the resampling process of the PF and improve the positioning accuracy.Wang et al.[37]fused PF with EKF for indoor positioning, reducing the generation of invalid particles and improving the particle degradation problem.

In summary,there exist two key problems in the existing indoor positioning approaches based on the PF fusion.The first one is that the large initialization range of particles leads to inaccurate initial positioning location;the second is that the particle state update is seriously affected by the accuracy of the sensor, and the position correction stage based on geomagnetic matching has the phenomenon of particle correction unsaturated and geomagnetic mismatch.To solve these above-mentioned problems, a novel indoor fusion positioning approach based on the improved PF algorithm by geomagnetic iterative matching is proposed,where Wi-Fi is used to implement the initial positioning of PDR, and geomagnetic signals to correct positioning results of PDR and Wi-Fi.Our most important contribution is that the process of geomagnetic iterative matching is firstly used to correct the positioning results of PDR and Wi-Fi.

The rest of this paper is organized as follows.In Section 2, the framework of our proposed indoor fusion positioning approach is introduced first, and then its implementation process is given.Section 3 analyzes the spatial time variation characteristics of the indoor geomagnetic field and Wi-Fi, and then describes the data processing process of all kinds of sensors.Section 4 introduces the improved particle filter fusion positioning approach in detail.Section 5 provides full experiments and analysis that verify the superiority of our approach by comparison with existing approaches.Finally, Section 6 concludes this paper.

2.Framework of improved indoor fusion positioning

Many PF fusion positioning algorithms adopt the solution of one time of geomagnetic correction in each positioning process, which causes insufficient position correction.Therefore, multiple geomagnetic corrections in each positioning process are introduced to improve the positioning accuracy in our proposed approach.We integrate Wi-Fi, geomagnetic, and PDR positioning technologies through the PF algorithm.PDR is used as the computing framework for state transition, Wi-Fi provides the initial position, and geomagnetic field is used to optimize the initial position and real-time positioning results.The principle of fusion positioning is as follows:

Firstly, the initial position of the pedestrian is roughly determined through Wi-Fi positioning, and on this basis, geomagnetic iterative matching is performed according to the geomagnetic difference between the positioning result and the actual location to realize the correction of the initial position, so as to obtain better initial positioning results.Then, heading, step number, and step length are used to form the state transition equation to predict the real-time PDR positioning results of pedestrians, and the geomagnetic iterative matching is used to correct the real-time positioning results to obtain more accurate location.

In our proposed indoor fusion positioning approach, the fingerprint matching method is used for Wi-Fi and geomagnetic positioning.The positioning process is divided into the offline stage the and online stage.In the offline stage, the Wi-Fi and geomagnetic fingerprint databases are established.In the online stage, an improved PF algorithm is used to determine the real-time location of a pedestrian based on the prepared Wi-Fi and geomagnetic databases and real-time sensor data.The positioning framework of the system is shown in Fig.1.

The implementation process of fusion positioning consists of five stages as follows:

1) Establish the positioning coordinate system.First,a positioning coordinate system need to be established the in the test area to determine the location of reference points.And then the reference points should be uniformly arranged, and the positioning accuracy is generally proportional to the number of reference points.

2) Offline data collection.An Android smartphone is used to collect the Wi-Fi and geomagnetic signals of reference points.The data to be collected are as follows:

where Aiand miare the Wi-Fi and geomagnetic signals collected at the reference point respectively; i is the serial number of the reference point and n is the number of Mac collected.

3) Data preprocessing and establishment of fingerprint databases.In order to overcome the instability of Wi-Fi signals, the Wi-Fi signals are collected multiple times at a reference point, and the RSSI of the same MAC is averaged.After that, all Wi-Fi signals are classified by K-means according to the similarity between Mac and RSSI.Finally,the classified Wi-Fi fingerprints of the reference points are stored in the Wi-Fi fingerprint database as follows:

where A is the Wi-Fi fingerprint database;m is the group number of the cluster; Fmis the mth group Wi-Fi fingerprint; Xmnand Ymnare the coordinates of the nth reference point in the mth group,and the corresponding Wi-Fi signal set is Amn.For the geomagnetic threeaxis data in the mobile phone coordinate system mi, it is needed to convert it into the navigation coordinate system to get the Mi={Mix,Miy,Miz}.Then Kriging is used for interpolation.Finally,all the geomagnetic signals and corresponding coordinates constitute the geomagnetic fingerprint database D that is depicted as follows:

where n is the number of reference points; Xnand Ynare the coordinates of the nth reference point;Mnis the geomagnetic vector of the nth reference point.

4) Online signal acquisition.The smartphone collects Wi-Fi and geomagnetic signals in real-time at the measured point.When the system starts positioning, the acceleration and gyroscope signals are collected in real-time according to the set frequency and stored in the database to prepare for PDR calculation.

5) Real-time positioning.Based on the PF fusion positioning approach, the location of the pedestrian is estimated by processing real-time signals and matching calculations.

Fig.1.The framework of indoor fusion positioning based on PF.

3.Characteristic analysis and preprocessing of multi-source sensor signals

3.1.Characteristics of indoor geomagnetic field and Wi-Fi

Theoretically, it cannot be applied to indoor positioning due to the small differences in geomagnetic values in small areas.However, when the geomagnetic field passes through a building, it is disturbed by the structure of the building and the metal facilities inside.These disturbances can cause significant geomagnetic differences in the indoor magnetic field at different locations.If the structure of the building and the indoor facilities do not change,the indoor magnetic field will remain relatively stable.This allows the indoor magnetic field to be used for indoor positioning.It is well known that Wi-Fi can be used for indoor positioning, but Wi-Fi signals are susceptible to environmental influences thus introducing many uncertainties in indoor positioning [29,38].

3.1.1.Stability of indoor geomagnetic field and Wi-Fi

In order to compare the stability of indoor magnetic field and Wi-Fi,the two kinds of signals were continuously collected through an Android smartphone for three days at a location in the experimental area.The test site was a graduate study room in an office building, where there was frequent personnel movement during the day(8:00 to 22:00)but almost no personnel movement at night(22:00 to 8:00 of the next day).The smartphone was held stationary during the acquisition.The sampling frequency of geomagnetic data was 0.1 Hz,and the geomagnetic three-axis data and modulus under the coordinate system of the mobile phone were denoted by x, y, z, and m, respectively.Due to the large number of access points (APs) in the test area and the excessive amount of Wi-Fi data, the sampling frequency of Wi-Fi was set to 0.033 Hz.The top 8 APs with the most stable signals were selected to observe their time-varied characteristics.The measurements of geomagnetic and Wi-Fi are shown in Figs.2(a) and 2(b),respectively.

Fig.2(a)shows that the indoor magnetic field is relatively stable.The range and standard deviation of geomagnetic modulus are 11.841 μT and 1.166 μT, respectively.Small fluctuations may be caused by two reasons: the geomagnetic field itself and the influence of the activities of indoor personnel.Fig.2(b) shows that the Wi-Fi signal fluctuates sharply during the day while gently at night.Due to the influence of indoor smart devices or AP's own factors,some Wi-Fi can't be searched all the time.In addition, APs with strong signals under the same conditions are less affected by the environment, and its fluctuation range is relatively small.The standard deviation of the Received Signal Strength Indication(RSSI)of the 8 APs ranges from 3.016 to 12.351 dbm.The above experimental results show that Wi-Fi is more susceptible to the influence of the surrounding environment than indoor magnetic field.

3.1.2.Spatial heterogeneity of indoor geomagnetic field

The spatial heterogeneity of the indoor geomagnetic field is the premise of indoor positioning based on geomagnetic fingerprint matching.Theoretically, the greater the geomagnetic variability in different locations,the more effective the geomagnetic positioning will be.To verify the spatial heterogeneity of geomagnetic fields at different locations indoors, we collected geomagnetic data by Android smartphones at the interval of 0.6 m along four corridors of a rectangular office building.Fig.3(a) shows the test paths, where the lengths of path 1 and path 3 are 41.4 m,and the lengths of path 2 and path 4 are 61.8 m.

At the same time, to explore the impact of different smartphones'built-in sensors on data acquisition,four different kinds of smartphones are used.The four smartphones are HONOR 9X(Number of cores:8;CPU:kirin810),OPPO R15x(Number of cores:8; CPU: Qualcomm Snapdragon 660), HUAWEI P10(Number of cores: 8; CPU: kirin960) and XiaoMi8(Number of cores: 8; CPU:Qualcomm Snapdragon845).Data collection is carried out successively based on these smartphones.Fig.3(b) shows the geomagnetic modulus data measured by the four smartphones.

Fig.2.Measurement results of indoor magnetic field and Wi-Fi:(a)Magnetic field data measured at the same location for three days;(b)Wi-Fi data measured at the same location for three days.

Fig.3.Verification of spatial heterogeneity of the indoor geomagnetic field: (a) Test path; (b) Geomagnetic data collected based on four different kinds of smartphones.

Fig.3(b)indicates that the built-in magnetic sensors of the four smartphones have different sensitivities, thus causing some differences in the geomagnetic data collected by different smartphones at the same location.Despite all this, the trend of geomagnetic data collected by different smartphones at different times on the same path is approximately the same, which verifies spatial heterogeneity of the indoor geomagnetic field along the corridor centerline.

The indoor geomagnetic positioning method based on fingerprint matching generally determines the measured location using several most similar points in its adjacent area.In order to find the difference of indoor geomagnetic field in the plane more accurately,we investigated the geomagnetic difference in the neighborhood of each point.For path 3 has the least geomagnetic heterogeneity,the corridor where Path 3 is located is used as the test area.The geomagnetic values of all grid vertices on the plane were collected at the interval of 0.6 m, as shown in Fig.4.

The width of the corridor is 2.4 m,the length is 41.4 m,and the geomagnetic variation is more obvious at both sides against the wall, because there may be metal substances such as steel bars in the wall.To explore the in-plane spatial heterogeneity of the indoor geomagnetic field within a small area, a sliding window is set to calculate the standard deviation (SD) of all geomagnetic data within the window.Taking 0.6 m as the moving step of the window,two routes are calculated in the test area using 1.2 m×1.2 m and 2.4 m×2.4 m windows respectively.The SD of the geomagnetic variation in Fig.2(a) is taken as the reference value.The processed results are shown in Fig.5.

Fig.4.Geomagnetic spatial heterogeneity in the corridor.

Fig.5.Geomagnetic standard deviations within the sliding windows.

As shown in Fig.5,the red line denotes the route with the sliding window size of 1.2 m×1.2 m.the blue line denotes the route with the sliding window size of 2.4 m×2.4 m.The red line consists of SDs of 204 sliding windows,188 of which are larger than the reference value, accounting for 92.2%.From the 69th to 137th sliding windows are located in the middle of the corridor and are less influenced by the walls on both sides, 60 of which are larger than the reference value,accounting for 88.2%.The blue line consists of SDs of 66 sliding windows, all of which are greater than the reference value.The SDs of geomagnetic values in the sliding windows reflect the degree of geomagnetic variation in the area.In conclusion,the indoor magnetic field, even in a small area, still shows obvious differences that can be measured by mobile phones, which indicates that the indoor positioning based on geomagnetic matching is feasible.

3.1.3.Feasibility of applying smartphones to indoor geomagnetic positioning

To illustrate that the geomagnetic value measured by the builtin sensors of mobile phones can be used for indoor positioning,the range of geomagnetic measurements of four different smartphones at each location is calculated using the geomagnetic data from Fig.3, which indicate the difference between the maximum value and the minimum value of the signals at each reference point.The results are shown in Fig.6.For comparison, the range of the geomagnetic in Fig.2(a) is used as a reference value.

As shown in Fig.6,the range at each point of path 1,path 2 and path 3 is smaller than the reference value,and the probability of the rang values of path 4 smaller than the reference value is up to 93.3%.That is, in most cases, the range of the indoor geomagnetic measurements of different smartphones at a location is smaller than that of geomagnetic fluctuations caused by the influence of the environment, which indicates that the geomagnetic values measured by different smartphones are basically consistent.Therefore, the indoor geomagnetic positioning method based on fingerprint matching can be applied to different smartphones.

Fig.6.The range of geomagnetic values of the four paths.

In summary, indoor magnetic field is less susceptible to environmental influences than Wi-Fi and is spatially heterogeneous,so positioning by magnetic field is better than by Wi-Fi in a local area.However, locations that are spatially distant may have similar geomagnetic characteristics,so the initial position obtained directly by geomagnetic matching in a large area may have large errors due to geomagnetic mismatch.Since the signals used for Wi-Fi positioning are sent by multiple deployed Aps and the Media Access Control(MAC)and RSSI received by distant locations have obvious differences,Wi-Fi has advantages over the magnetic field for coarse positioning over large areas.To reduce the complexity of the approach and the influence of human activities,Wi-Fi is used only at the initial position to achieve coarse positioning and the magnetic field is used to correct the result.Magnetic field combined with improved PF is used for real-time positioning to correct the error of PDR and improve positioning accuracy.

3.2.Preprocessing of Wi-Fi signals

Wi-Fi fingerprints can be classified into several regional groups according to the spatial similarity of signal characteristics, so as to improve the efficiency of online fingerprint matching.Our study adopts the method of Ref.[38]and realizes the clustering of Wi-Fi fingerprints based on the K-means algorithm with the similarity of MAC and RSSI of the reference location as the indicator.During Wi-Fi fingerprint positioning,real-time signals can be quickly matched to region groups with high similarity according to signal characteristics, thus improving the work efficiency of Wi-Fi fingerprint positioning.

3.3.Preprocessing of geomagnetic signals

3.3.1.Coordinate conversion

Different from Wi-Fi RSSI collection, geomagnetic data is collected by the built-in magnetometer of the smartphone in the mobile phone coordinate system.Because the posture of the smartphone in the process of positioning is changeable, the collected geomagnetic data in the mobile phone coordinate system at a location will change with the posture and cannot be directly used as the geomagnetic fingerprint.According to Ref.[39], the geomagnetic data in the mobile phone coordinate system must be converted to the navigation coordinate system independent of the mobile phone posture, so as to establish a stable correspondence between the geomagnetic data and the location.

Based on the rotation matrix and Euler angle calculation method provided by the Android development environment, we implemented and validated the coordinate transformation of geomagnetic data.At a certain position,we constantly changed the posture of the smartphone and obtained 200 sets of testing data.The comparison of results before and after coordinate transformation is shown in Fig.7, where the geomagnetic three-axis data and modulus data in the mobile phone coordinate system are represented by x,y,z,and m respectively,and the geomagnetic three-axis data and modulus data in the navigation coordinate system are represented by X, Y, Z, and M respectively.

Fig.7 shows that at the same position,the geomagnetic modulus is not affected by the posture of the smartphone,but the three-axis geomagnetic data is greatly affected by the posture of the smartphone.However, the three-axis geomagnetic values are basically the same after conversion to the navigation coordinate system.However, the X-axis component tends to zero in the navigation coordinate system,and when it is used for geomagnetic matching,the dimension of the feature quantity is reduced.During coordinate conversion, since we assume that the magnetic field vector in the mobile phone coordinate system is in the plane between the center of the Earth and the magnetic South Pole, there can be no vector pointing to the magnetic east.Therefore, in the navigation coordinate system, there will be no magnetic east vector, namely, the Xaxis tends to zero.

Fig.7.Geomagnetic data in different coordinate systems at a certain location: (a) The data in mobile phone coordinate system; (b) The data in navigation coordinate system.

3.3.2.Accuracy of the coordinate conversion

To increase the matching accuracy, during online positioning,the geomagnetic values in the fingerprint database need to be converted into the mobile phone coordinate system based on the current posture of the smartphone and matched with the real-time collected geomagnetic three-axis data.The calculation of geomagnetic matching accuracy is shown in Eq.(1).

where a is the accuracy of geomagnetic matching; Xconverted,Yconvertedand Zconvertedare the geomagnetic three-axis data converted from the database to the mobile coordinate system.Xonline,Yonlineand Zonlineare respectively the geomagnetic threeaxis data in the mobile phone coordinate system collected in real-time.Geomagnetic matching results are shown in Fig.8.

Fig.8 shows that the coordinate conversion of geomagnetic data based on the Euler angle has higher accuracy.The maximum,minimum,and standard deviation of the errors are 2.59 μΤ,0.65 μΤ and 0.47 μΤ respectively.

3.3.3.Geomagnetic data interpolation

In order to improve the accuracy of geomagnetic fingerprint positioning and save the workload of data acquisition,we collected geomagnetic data by single point acquisition at an interval of 0.6 m,and used the Kriging Gaussian model with strong anti-interference ability for interpolation [40].The interpolation interval of geomagnetic fingerprint is 0.3 m,which saves 74%of the workload.

3.4.Calculation of PDR parameters

3.4.1.Heading estimation

3.4.2.Real-time step detection

Real-time step detection is the premise of particle state transition.A multi-threshold real-time step detection algorithm based on peak-valley threshold and time constraints is proposed, which is used to detect pedestrian movement in the movement detection stage of indoor fusion positioning.Firstly, the Smooth filter and Kalman filter are used to process the real-time overall acceleration in turn to reduce the noise and pseudo peaks and valleys in the original data.Then, the peak-valley threshold and time threshold are set to further process the filtered acceleration to detect the number of steps.The preprocessing results of acceleration are shown in Fig.9.

Fig.9.The preprocessing of Acceleration data.

As shown in Fig.9,a small number of pseudo-peaks and valleys still exist in the filtered acceleration data which need further processing.The real-time step detection algorithm proposed is as follows:

1) Judgment of accelerated trend

And no longer could people say they felt blue or were green with envy8 or had a green thumb. So what they said and how they said it began to change. Some people said violet was now the most important color in the world because it was everywhere. Others said that violet had no importance at all because there was too much of it. They discussed and argued, joined clubs, held debates, wrote books, and produced movies all about the issue9 of the importance or unimportance of the color violet.

When processing the real-time acceleration, so the peaks and valley values cannot be directly determined.Peak acceleration and valley acceleration shall be local maximum and minimum respectively.Before the peak or valley acceleration detection, the realtime acceleration should be judged according to Eq.(3) whether it rises to the minimum threshold of the peak or falls to the maximum threshold.

where Acc(t)is the real-time overall acceleration after filtering,and the current time is t;th1pis the minimum peak threshold,and th1vis the maximum valley threshold.When Eq.(3) is satisfied, subsequent acceleration collected is used for peak or valley acceleration detection.

2) Peak acceleration detection

Firstly,according to Eq.(4),it is judged whether the acceleration at the previous moment is a local maximum.

where Acc(t-1) is the acceleration at time t- 1.When Eq.(4) is satisfied, the acceleration Acc(t-1) of the previous moment is preliminarily determined as the suspected peak acceleration and recorded as Acc′p(i).

Secondly, the peak acceleration is determined by judging the difference between the real-time acceleration and the suspected peak acceleration.

where Acc(t) is the real-time acceleration to be judged; th2pis an empirical value determined by a large number of experiments.When Eqs.(5)and(6)are met at the same time,Acc′p(i)is the true peak acceleration and recorded as Accp(i), and the corresponding time is tp(i).If the real-time acceleration Acc(t)does not meet Eqs.(5) and (6), update Acc′p(i) is the acceleration at the current time and continue to judge.If Eq.(5)is met but Eq.(6)is not,continue to judge until Eqs.(5) and (6) are met at the same time.

3) Valley acceleration detection

4) Time threshold constraint

Generally,the time for a person to take a step should be within a range, that is, greater than the minimum time required for a step and less than the maximum time used for a step.Although the acceleration from peak to valley is not enough to one step,there can only be one true peak and valley acceleration in a walking cycle.Therefore, we set corresponding empirical parameters to improve the accuracy of real-time step counting.

where thrminand thrmaxare the minima and maximum time required for one step respectively; k1and k2are the empirical parameters.

High-frequency noise produced when smartphones are in the pocket during step detection will cause tv(i)- tp(i)k2×thrmaxwill be caused.We need to take the current acceleration as the initial peak acceleration and redetect it.If Eq.(7) is satisfied, the system considers that we have taken one step.

By using the algorithm above, real-time step counting can be carried out effectively.In this study, five movement states such as normal walking, slow walking, fast walking, jogging, and fast running,were tested.The smartphone is placed on the chest during the test, and the test results are shown in Table 1.

Table 1 shows that the proposed algorithm can effectively perform real-time step counting.The accuracy of step counting can be up to 99% in both the slow walking and normal walking states.The correct rate of step counting under the fast running state needs to be improved, and we will study it in future work.

3.4.3.Step length estimation

Although there are many more complex and accurate step length estimation models that consider walking speed or human height, the fixed step length of 0.6 m is used in our research according to Ref.[41].On the one hand, complex and dynamic step length estimation models require the data fusion of many types of sensors, which will increase the computational complexity of the system.On the other hand, the step length only provides distance for the state equation in the process of our fusion positioning,which does not need to be very accurate because more accuratepositioning positions can be found through geomagnetic iterative matching.

Table 1 Detection results of step number.

4.Indoor PF fusion positioning based on geomagnetic iterative matching

4.1.Geomagnetic iterative matching model

In particle filter algorithm, the position and mode of particle placement will affect the convergence process and accuracy of the filter.In order to improve the indoor fusion positioning accuracy based on PF, an iterative window (IW) and a constraint window(CW)are introduced.During the positioning process,IW is used to generate particles within it and to implement iterative geomagnetic mismatch to find better positioning result.CW is used to limit the moving rang of IW.When the particles of IW are located outside CW, they will be viewed as invalid particles.The model of geomagnetic iterative matching is shown in Fig.10.IW is displayed as a black square and CW is displayed as a red square.

When a pedestrian enters the experimental area, the initial position of the pedestrian is obtained through Wi-Fi fingerprint positioning.And then this position is used to determine the initial location of CW and IW as their center point.In the next, geomagnetic matching is iteratively performed by IW to correct the Wi-Fi positioning result under the constraint of CW until the number of iterations is larger than a threshold or the error of final position is little than a given value.When a new step is detected by a smartphone,the new position calculated by PDR is used as the state transition equation of the particle to update the position of the center point of IW.Meanwhile,the position of CW is updated to the new position.At each point to be positioned,geomagnetic iterative matching of IW is always performed under the limitation of CW to correct the positioning result.By reasonably setting the window size and iterative threshold, the convergence rate and positioning accuracy of the PF positioning are effectively improved.

4.2.Fusion positioning process

To descript in detail,the improved PF fusion positioning process based on the geomagnetic iterative matching model,the process of real-time online positioning is given by steps as follows (Fig.11):1) Signal acquisition of the measured point

During positioning initially, acceleration and gyroscope signals are collected continuously to detection the movement and heading estimation, while Wi-Fi signals and geomagnetic signals are collected one time to compute the initial position when turning on the positioning system.Once the initial position is obtained,Wi-Fi signal will not be collected because only PDR and geomagnetic information are used for positioning at this time.Sa+1a is the data set collected during the pedestrian take a step from the measured point a to point a+ 1.where a is the serial number of the reference point;i is the number of signals collected; m, acc and gyr are signals of geomagnetism,acceleration, and gyroscope respectively.

Fig.10.The model of geomagnetic iterative matching.

Fig.11.The flowchart of online positioning.

2) Initial position estimation based on Wi-Fi

Firstly, the Euclidean distance of Wi-Fi signals between the measured point and the cluster center point of each group is calculated according to the following equation:

where Lkis the Euclidean distance between the measured point and the kth cluster center point,and n is the maximum number of Mac collected from the cluster center and the measured point; k is the serial number of the group.

Secondly,the group G with the highest similarity is found.Then the similarity Drbetween the measured point and all fingerprint points in G is calculated using Eq.(8).r is the serial number of the point in G.At last, e reference points with the smallest Euclidean distance from the measured point are selected to calculate the final position (X0a,Y0a) using the following equation:

where(Xi,Yi) is the ith coordinate of the Wi-Fi fingerprint point.

3) Initialize CW, IW, and particles

4) Update particle weights

When particle weights are updated,weights of particles outside IW or CW or the area covered by the fingerprint database are set zero,which can be calculated as follows:

5) Location estimation

The location of the pedestrian is estimated by calculating the weighted mean of particle coordinates.

7) Iteration termination judgment

8) Movement detection

If the movement of the pedestrian is detected by the step detection algorithm, perform step 9).Otherwise, the positioning system will consider the pedestrian position unchanged.

9) Constraint window and particle state update

According to the step length and heading provided by PDR,the state of the pedestrian is predicted and the state of particles is updated using the following equation:

The positioning strategy at the boundary of the experimental area that determined by Wi-Fi and geomagnetic reference points is as follows:Due to the influence of the initial positioning error and the cumulative error of the PDR, when the pedestrian approaches the boundary of the experimental area, the particle state may be outside the experimental area after updating.At this time, the particle weights are all zero, and the system feeds back an error message.We need to continuously magnify the IW in the CW and resample until the particle weight sum is greater than zero; If the IW is equal to the size of the CW and the particle weight sum is still zero, it means that the entire CW is outside the experimental site.We need to magnify the range of both the IW and the CW until the sum of the particle weights is greater than zero,and then estimate the pedestrian's position with the existing particles.

5.Experiment and analysis

In order to verify the feasibility of our proposed approach,a part of the first floor of the Library of Shandong University of Science and Technology is selected as the test site.The size of the test area is 23.4 m×12 m, and the testing smartphone is the HONOR 9X(Number of cores: 8; CPU: kirin810; Set sensors sampling frequency: Gyroscope: 10 Hz; Accelerometer: 16 Hz; Magnetometer:16 Hz).There are several bookcases in the middle of the experimental area,so the geomagnetic change in the middle is relatively obvious.The data used in the experiment is collected by the built-in sensors of the smartphone.During the experiment, we held the smartphone flat on our chest.

The proposed approach will correct the initial position by geomagnetic information,so high requirements on the accuracy of Wi-Fi initial positioning are not needed.In addition, all experiments were carried out on the APP developed by ourselves.To save storage space and improve Wi-Fi preprocessing time and matching time, the interval of 1.2 m between two reference points was chosen to establish the Wi-Fi fingerprint database, which consists of 220 Wi-Fi reference points.RSSI is collected 8 times to get the average value at each Wi-Fi reference point.The average value of RSSI and its corresponding MAC address are stored as the Wi-Fi fingerprint feature of the reference point.There are 41 APs in the test area.During Wi-Fi positioning, the top 10 APs with the strongest RSSIs in the real-time data are selected for matching [38].

The interval of 0.6 m was set for geomagnetic data collection.As a result, 840 geomagnetic reference points were set up in the test area.We first converted the geomagnetic data collected in the mobile phone coordinate system to the navigation coordinate system.Then, the Kriging interpolation based on the Gaussian model was used to interpolate the geomagnetic data of X, Y and Z axes in the navigation coordinate system at an interval of 0.3 m.At last, 3239 sets of interpolated geomagnetic data were used to establish a geomagnetic fingerprint database.

5.1.Influence of PF parameters on positioning accuracy

In the improved PF algorithm, IW and CW effectively limit the geomagnetic matching range, and iteration threshold can be used to control the PF convergence rate and positioning accuracy.To effectively study the influence of the above three parameters on the accuracy and efficiency of fusion positioning, several groups of experiments were conducted by changing one parameter and fixing the other parameters.First, to ensure that the study was not affected by the variability in the results of each Wi-Fi initial positioning,multiple Wi-Fi positioning were performed in advance for the initial location.A fixed location was determined as the initial result of each Wi-Fi positioning,which had an error of 3.52 m.Then,one of the parameters was changed successively for comparative study.Time consumption of positioning each point was recorded during each experiment, the average of which was taken as single point positioning time of the approach.The above three parameters were verified in turn by the control variable method, statistical results are shown in Table 2.

It can be seen from Table 2 that for the PF fusion positioning approach before the improvement,its average positioning accuracy is 2.38 m.The positioning accuracy will be improved by adjusting IW, CW and iteration threshold in the proposed approach.For the improved PF approach,when IW is fixed to 1.2 m×1.2 m and CW is fixed to 2 m × 2 m, the fusion positioning accuracy is the highest when the iteration threshold is 6.Then,fixing the IW to 1.2 m×1.2 m,the positioning accuracy is optimal when the iterative window is 2.4 m × 2.4 m and the iterative threshold is 8.It can be seen from the experimental results that the three parameters are closely related to each other.Under the effective limitation of CW, the influence of geomagnetic mismatch can be effectively alleviated by adjusting IW and iteration threshold.The approach effectively reduces the accumulated error of PDR.The experimental results prove that the approach can effectively improve positioning accuracy.

According to Table 2,when the iterative window is 1.2 m×1.2 m and the constraint window is 2.4 m×2.4 m,the positioning result is the best, and the running time is about 0.7 s on average.Commonly, the frequency of normal walking is 1.25-3.33 Hz, and the corresponding time is 0.3-0.8 s [42].It shows that the time of our positioning algorithm can basically meet the needs of normal walking, but it needs to be further improved.Obviously, iterative processing will increase the processing time of the system due to more calculation steps.In fact, positioning efficiency of smartphones is impacted by many factors such as the scale of fingerprint database, the performance of smartphones, the number of iterations and particles.In future research, we will optimize iterative processing to improve the efficiency of indoor positioning.

5.2.Accuracy comparison with existing fusion positioning approaches

During online positioning, IW and CW are set to 1.2 m × 1.2 m and 2.4 m × 2.4 m respectively, and the geomagnetic iterative matching threshold is 8.Our proposed approach is compared with that in Ref.[29] and “Wi-Fi + PDR”.All three approaches use the methods described in subsections 3.2 and 3.4 to solve Wi-Fi and PDR.To ensure that each approach is not affected by the variabilityof the Wi-Fi initial positioning results, the initial position is estimated several times in advance using Wi-Fi positioning, and the average of estimated positions is selected as the common initial position of the three methods.The positioning results and accuracy of different approaches are shown in Fig.12.And Table 3 and Fig.13 show different errors and the CDF charts respectively.

Table 2 The Effect of different parameters on the fusion positioning results.

Fig.12.Positioning results and accuracy of different indoor positioning approaches:(a) Positioning results of different approaches; (b) Positioning accuracy of different approaches.

As shown in Fig.12 and Table 3, the positioning track of “Wi-Fi + PDR” seriously deviates from the actual test track because of the increase of PDR cumulative error.The influence of PDR cumulative error is eliminated to a certain extent by one geomagnetic correction of the approach of Ref.[29].Our approach further improves Ref.[29]through multiple geomagnetic corrections,and the overall positioning accuracy is better than Ref.[29].For the initial positioning,we took the same Wi-Fi positioning result as the initial position, and then one geomagnetic correction (Ref.[29]) or multiple geomagnetic corrections (our approach) based on the geomagnetic signals were carried out to optimize for the Wi-Fi positioning results (Wi-Fi + PDR).The experiments show that the optimized accuracy is improved by 0.09 m and 0.40 m respectively.That is,the initial positioning errors of three approaches are 3.52 m,3.43 m and 3.12 m respectively.For the overall positioning accuracy,the average errors of Ref.[29] and our approach are 2.38m,1.59m,respectively.And their RMSEs are 2.45m, 1.91m, respectively.In addition,Fig.13 shows that the proportion of positioning error less than 2 m in this study is 67%, while that of Ref.[29] is only 26%.It can be seen that the proposed approach is superior to Ref.[29].

Fig.13.The CDF diagram of different indoor positioning approaches.

In the first 11 test points, it can be seen that the error of the improved approach drops rapidly, which fully improves the convergence rate of PF and reduces the cumulative error of PDR.The reason for the rapid decline of the 18th and 19th positioning errors of the approach before the improvement is that when the tester approaches the experimental boundary,the particles exceed the experimental boundary, and the positioning results are obtained by increasing the number of particles.It can be seen in Fig.12(b) that the positioning accuracy of some points in the experiment is lower than that before the improvement.The reason is that the distance in the east-west direction is relatively short,the constraint window is set too large, and the heading angle error provided by PDR is relatively larger, resulting in erroneous matching after multiple iterations of the geomagnetic field.However,due to the limitation of the iterative window,when moving in the wrong direction, the iteration results will also be limited.

5.3.Effectiveness of geomagnetic iterative matching

In order to fully illustrate the superiority of the geomagnetic multiple corrections proposed in this study, two sets of comparative analysis experiments were conducted.The positioning results of the first and last geomagnetic corrections are recorded separately in one indoor positioning as shown in Fig.14(a).In addition,the results of two indoor positioning with different iterations are recorded in Fig.14(b).

As shown in Fig.14(a), in the process of one indoor real-time positioning, we recorded the location results obtained by onegeomagnetic matching at each test point and the location results after multiple matches.In this experiment,we set IW as 1.2 m×1.2 m,CW as 2 m×2 m,and iteration threshold as 5,and the average positioning accuracy is 2.34 m.The yellow points in Fig.14(a)represent the results obtained by one geomagnetic correction.The red points are the results of multiple corrections of geomagnetic field.The black points are the actual position.First of all,the red dot at the last moment is transferred according to the PDR.Then a geomagnetic matching is performed to obtain the yellow dot at the next time.We connect the points corresponding to the same location with short lines.It can be seen that in most cases, the location of multiple geomagnetic corrections is closer to the test location than the location of one geomagnetic correction.

Table 3 Errors of different positioning approaches.

Fig.14.Analysis of the geomagnetic iterative matching process: (a) Multiple geomagnetic corrections process in indoor positioning; (b) Positioning results of different geomagnetic iterative thresholds.

Fig.14(b) compares the results of two indoor real-time positioning with iterative thresholds of 5 and 8 respectively.Their average positioning accuracy are 2.26 m and 1.59 m respectively.During the test,we set IW as 1.2 m×1.2 m and CW as 2.4 m×2.4 m.From the above experiments, it can be seen that the positioning accuracy can be improved by setting IW and CW with reasonable parameter settings and performing multiple geomagnetic corrections within CW.

In order to further verify the feasibility of our proposed approach,we added a more complex path in the experimental area for indoor positioning test and set IW as 1.2 m × 1.2 m, CW as 2.4 m×2.4 m and iteration threshold as 8.The experimental results are shown in Fig.15.

In Fig.15,the red dots and lines represent the indoor positioning results, and the black dots represent the test positions.The white dots are the positioning results of PDR,and the initial point of PDR is provided by Wi-Fi.We connect the corresponding points with yellow short lines.The average positioning accuracy of the proposed approach is 1.66 m.It can be seen from the figure that the heading angle accuracy of the PDR calculated by the low-overhead smartphones is poor.This will affect the process of particle transfer,thus affecting the accuracy of indoor positioning.In the future research,we will study the high-precision real-time heading angle estimating solution.

6.Conclusions

For the existing low-overhead indoor fusion positioning approaches based on the PF to be easily influenced by sensor instability and geomagnetic mismatch,a novel indoor fusion positioning approach that integrates Wi-Fi, PDR, and geomagnetic signals based on the improved PF is proposed.The existing PF indoor fusion positioning approaches only correct the positioning result once by geomagnetic matching,which makes the positioning accuracy and the convergence rate of PF relatively poor.We use multiple geomagnetic matching in once positioning to fully correct the positioning results, which improves the shortcomings of existing approaches.Our positioning test system runs on Android smartphones to achieve indoor real-time positioning.And the experimental results show that the positioning accuracy of the proposed approach is higher than that of the existing approaches.In addition,this paper also proposes a real-time step detection algorithm to effectively detect whether the pedestrian is moving, which fully guarantees the real-time of fusion positioning.

Fig.15.The results of indoor positioning by proposed approach.

Due to multiple geomagnetic matching in each positioning,the efficiency of this approach is relatively low.In future research, the positioning efficiency of the proposed approach will be improved from the following three aspects: optimization of the code of the algorithm to improve the speed of database information acquisition, adaptive calculation of iterative threshold based on the geomagnetic spatial characteristics, and improvement of heading estimation accuracy in the fusion positioning approach.The indoor magnetic field is usually the geomagnetic field affected by building structures or indoor furniture.For indoor large open spaces without building structures or indoor furniture, such as gymnasiums, the indoor geomagnetic environment of open space will be relatively monotonous.Geomagnetic iteration will show no advantages.Certainly, the indoor magnetic field environment can be changed by adding magnetic stripes.This needs further study.

Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (Grant No.42271436) and the Shandong Provincial Natural Science Foundation, China (Grant Nos.ZR2021MD030, ZR2021QD148).

91香蕉高清国产线观看免费-97夜夜澡人人爽人人喊a-99久久久无码国产精品9-国产亚洲日韩欧美综合