Universal geo-fence and inertial navigation fused indoor positioning method

By deploying low-power wireless access points and IMU sensor data fusion in indoor environments, combining adaptive zero-speed detection and multi-source data optimization, the problems of high costs and cumulative errors in existing indoor positioning technologies are solved, and high-precision and low-cost indoor positioning solutions are achieved.

CN120333425APending Publication Date: 2025-07-18ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510663231.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Existing indoor positioning technologies face problems such as high cost, insufficient robustness, large cumulative errors and high deployment costs during large-scale deployment, especially in complex indoor environments, which are difficult to achieve high-precision and low-cost positioning.

Method used

The low-power mode wireless access point is used as the geofencing point, combined with IMU sensor data and adaptive zero-speed detection, attitude solving is performed through Mahony and Madgwick complementary filters, and multi-source data fusion is used to fusion with improved edit distance rate geomagnetic matching algorithm and factor graph model to build a robust indoor positioning system.

Benefits of technology

High-precision positioning under sparse deployment conditions is achieved, the average positioning error is controlled within 1.5 meters, and 95% positioning error does not exceed 3.0 meters, which significantly improves the accuracy of zero-speed detection and closed-loop detection efficiency, and reduces deployment density and power consumption requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120333425A_ABST
    Figure CN120333425A_ABST
Patent Text Reader

Abstract

The invention discloses a general geo-fence and inertial navigation integrated indoor positioning method, which comprises the following steps of: deploying a low-power-consumption mode wireless access point as a geo-fence point in an indoor application scene, and preprocessing inertial sensor data acquired by an IMU (Inertial Measurement Unit) sensor group built in pedestrian terminal equipment; and the attitude quaternion of the terminal equipment under the global coordinate system is solved, and an initial pedestrian motion track is generated through pedestrian dead reckoning. And then obtaining geofence point observation data, and optimizing the initial pedestrian movement track to obtain an optimized pedestrian movement track. According to the method, inertial navigation data, geo-fencing point observation and geomagnetic matching results are unified into an optimization framework, the influence of abnormal observation is inhibited through a robust kernel function, global consistent trajectory estimation is realized, and the positioning precision is improved. Deployment of the wireless access points in the low-power-consumption mode greatly improves certainty of position reference, and reduces deployment density and power consumption requirements at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of indoor positioning, and specifically relates to an indoor positioning method that integrates a general geofence and inertial navigation, which is applicable to complex indoor environments without GPS signals. Background Art

[0002] With the rapid growth of the demand for indoor location services, indoor positioning technology has become an important research direction in the field of navigation. However, due to the shielding or severe attenuation of the signals of the Global Navigation Satellite System (GNSS) in indoor environments, it cannot work stably, and the development of indoor positioning technology faces unique challenges. To address this issue, current mainstream indoor positioning solutions mainly rely on specific types of sensors to capture signals emitted by infrastructure, including but not limited to Wi-Fi, wireless APs, Radio Frequency Identification (RFID), Ultra-Wideband (UWB), millimeter-wave radar, and optical and acoustic sensing devices, etc.

[0003] Although in experimental environments, the above-mentioned solutions can achieve high-precision indoor personnel positioning, in large-scale actual deployments, existing indoor positioning technologies generally face serious technical bottlenecks. Traditional high-precision indoor positioning systems usually require intensive deployment of high-cost infrastructure, such as UWB base stations or high-density Wi-Fi access points, etc., making the deployment cost per unit area high, installation and maintenance complex, and the overall cost is often unacceptable when fully deployed in places such as large shopping malls, hospitals, or airports. In terms of system robustness, most signal-strength-based positioning methods are highly sensitive to environmental changes. Changes in the density of people, movement of furniture, or even changes in humidity can cause significant changes in signal characteristics, resulting in a substantial decrease in positioning accuracy. Especially in crowded public places, the absorption and reflection of wireless signals by the human body will cause severe multipath effects, further reducing the system reliability. At the same time, the energy consumption issue cannot be ignored. High-precision positioning infrastructure and mobile terminals usually need to operate continuously at high power, which not only increases energy consumption but also shortens the usage time of battery-powered devices, and is not suitable for long-term deployment and mobile scenario applications. In addition, some indoor positioning technologies may need to continuously collect user location data or even biometric information, which, in the context of increasingly strict current privacy protection regulations, has raised serious privacy and security risks and faces compliance challenges.

[0004] As an alternative, the pedestrian dead reckoning (PDR) technology based on inertial measurement units (IMUs) has received extensive attention because it does not rely on external infrastructure. The PDR technology uses inertial sensors such as accelerometers and gyroscopes to estimate the change in the pedestrian's position by detecting steps and estimating step lengths. However, due to the cumulative effects of integration errors and sensor noise, the PDR technology will produce significant cumulative errors after long-term use, resulting in exponential drift in position estimation. According to research, the error of the pure PDR method may expand to more than 10 meters within 10 minutes, and may even exceed 30 - 50 meters after 30 minutes, seriously affecting the positioning effect.

[0005] To address the cumulative error problem of PDR, several correction methods are commonly used in the prior art. The zero velocity update (ZUPT) technology uses the detection of the stationary phase in the pedestrian gait to set the velocity to zero when a stationary state is detected, reducing the accumulation of velocity errors. However, the traditional ZUPT algorithm uses a fixed threshold judgment criterion, which is difficult to adapt to the motion characteristics of different users and diverse walking scenarios. The magnetometer-assisted method uses the geomagnetic field to provide a heading reference, but conventional magnetometers are extremely vulnerable to interference from indoor metal structures and electronic devices, resulting in inaccurate heading estimation. Fixed anchor point correction provides an absolute position reference through pre-deployed positioning anchors (such as wireless APs, Wi-Fi access points), but traditional methods require high-density deployment of anchors to provide continuous coverage, with high deployment and maintenance costs. Map matching matches the trajectory with a pre-constructed indoor map to exclude physically infeasible paths, but most existing methods use simple geometric constraints and do not fully utilize the characteristics of the user's historical trajectory and the environmental topology. Although the above various methods can improve the accuracy of PDR to a certain extent, there are still obvious limitations. Especially in the case of sparse deployment of devices, variable user movement patterns, and complex and changing environments, it is difficult to achieve both low cost and high-precision indoor positioning simultaneously.

[0006] In recent years, to address the above problems, researchers have begun to focus on hybrid positioning systems that integrate multiple technologies. Some studies have attempted to combine Wi-Fi fingerprinting and PDR for indoor positioning, using particle filters to fuse different data sources. However, these methods usually still require a relatively high density of Wi-Fi access point distribution and rely on complex signal strength model calibration. Other researchers have proposed methods that fuse wireless APs and inertial sensors, but most of them use the traditional RSSI attenuation model for distance estimation, which is greatly affected by multipath effects and signal attenuation uncertainty. There is still a lack of an indoor positioning solution that can maintain high accuracy and good robustness under sparse beacon deployment conditions. Summary of the Invention

[0007] The objective of this application is to provide an indoor positioning method and system that integrates a general geofence and inertial navigation, so as to overcome the technical problems of poor scalability, insufficient robustness, large cumulative errors, and high deployment costs existing in the above-mentioned existing indoor positioning technologies, and achieve accurate indoor positioning.

[0008] To achieve the above objective, the technical solution of this application is as follows: An indoor positioning method that integrates a general geofence and inertial navigation, including: Deploy low-power mode wireless access points as geofence points in indoor application scenarios; Preprocess the inertial sensor data collected by the IMU sensor group built in the pedestrian terminal device, and calculate the attitude quaternion of the terminal device in the global coordinate system; Generate an initial pedestrian movement trajectory through pedestrian dead reckoning; Obtain geofence point observation data, and optimize the initial pedestrian movement trajectory to obtain an optimized pedestrian movement trajectory.

[0009] Furthermore, the effective detection range of the geofence point is within a radius of 0.5 meters to 1.0 meters.

[0010] Furthermore, for calculating the attitude quaternion of the terminal device in the global coordinate system, the Mahony and Madgwick complementary filters are used for calculation.

[0011] Furthermore, the generating of the initial pedestrian movement trajectory through pedestrian dead reckoning includes: Perform adaptive zero-velocity interval detection to determine the zero-velocity interval; Perform step detection and step length estimation to obtain a step sequence; Process each detected step in sequence to generate the initial pedestrian movement trajectory.

[0012] Furthermore, the adaptive zero-velocity interval detection includes: Construct a dual-threshold adaptive decision-making model based on the variance of acceleration and the norm of angular velocity , where: Static acceleration criterion: ; Static angular velocity criterion: ; where, is the adaptive threshold of the variance of acceleration, is the adaptive threshold of the norm of angular velocity; When both of the above criteria are satisfied simultaneously, it is determined that the current moment is in a zero-velocity state.

[0013] Further, the adaptive threshold of acceleration variance and the adaptive threshold of angular velocity modulus are updated periodically, and the update formulas are as follows: Wherein, is the updated adaptive threshold of acceleration variance, is the updated adaptive threshold of angular velocity modulus, is the adaptive threshold of acceleration variance before update, is the adaptive threshold of angular velocity modulus before update, and are smoothing factors, and are adaptive functions based on the historical data distribution.

[0014] Further, the obtaining of the observed data of the geofence points and the optimization of the initial pedestrian movement trajectory to obtain the optimized pedestrian movement trajectory includes: Performing geomagnetic matching closed-loop detection to obtain a list of closed-loop detection results; Based on the initial pedestrian movement trajectory, the observed data of the geofence points, and the list of closed-loop detection results, constructing a multi-source data fusion factor graph model; Performing optimization and solution on the constructed multi-source data fusion factor graph model to obtain the optimized pedestrian movement trajectory.

[0015] Further, the geomagnetic matching closed-loop detection includes: When calculating the edit distance between sequences, different weight coefficients are assigned to deletion, insertion, and replacement operations; And, the sequence similarity scoring formula in the closed-loop detection is: ; Where represents the weighted edit distance between sequence A and B, is the similarity adjustment factor, and represent the lengths of sequence A and sequence B .

[0016] Further, the indoor positioning method for the fusion of the general geofence and inertial navigation further includes: Performing physical constraints on the optimized pedestrian movement trajectory to obtain a physically constrained corrected trajectory; Performing smoothing processing on the physically constrained corrected trajectory to obtain a smoothed pedestrian movement trajectory.

[0017] Further, the indoor positioning method for the fusion of the general geofence and inertial navigation further includes: Perform trajectory quality assessment on the smoothed pedestrian movement trajectory, and calibrate the pedestrian movement trajectory according to the quality assessment score.

[0018] An indoor positioning method that combines a general geofence and inertial navigation proposed in this application innovatively configures the wireless AP to work in a low transmission power mode, with a coverage radius of only about 0.5 meters to 1.0 meters, forming a highly spatially discrete "geofence point" network, greatly improving the certainty of position reference, while reducing the deployment density and power consumption requirements. Secondly, aiming at the problem that traditional zero-speed detection is difficult to adapt to the motion characteristics of different users, an adaptive dual-threshold decision model based on acceleration variance and angular velocity magnitude is proposed, which can dynamically adjust the detection threshold according to the user's motion state, significantly improving the accuracy and robustness of zero-speed detection, increasing the detection accuracy rate by more than 20%, and effectively suppressing the speed error accumulation in PDR. In addition, the edit distance rate (EDR) geomagnetic matching algorithm is innovatively improved, introducing a weight coefficient and a topological similarity adjustment factor to enhance the resistance to mutant geomagnetic signal interference and improve the closed-loop detection efficiency. Compared with the traditional algorithm, the matching success rate is increased from 70% to over 90%, which can more accurately identify the positions where the user repeatedly passes by and provide effective position closed-loop constraints. Finally, this application innovatively constructs a multi-source data fusion model based on factor graph, unifying inertial navigation data, geofence point observations, geomagnetic matching results, and map constraints into an optimization framework, suppressing the influence of abnormal observations through a robust kernel function, achieving globally consistent trajectory estimation, with the average positioning error controlled within 1.5 meters, and 95% of the positioning errors not exceeding 3.0 meters. Brief Description of the Drawings

[0019] Figure 1 It is a flow chart of the indoor positioning method that combines a general geofence and inertial navigation in this application. Detailed Description of the Embodiment

[0020] In order to make the objectives, technical solutions, and advantages of this application clearer, the following further elaborates on this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0021] An embodiment of this application, as Figure 1 shown, proposes an indoor positioning method that combines a general geofence and inertial navigation, including: Step S1, deploy a low-power mode wireless access point as a geofence point in an indoor application scenario.

[0022] Deploy wireless access points (APs) as geofence points in an indoor environment. Configure these wireless APs to work in a low transmit power mode, for example, with a transmit power in the range of -45 dBm to -35 dBm. When the wireless AP is configured with a transmit power in the range of -45 dBm to -35 dBm, its effective detection range is strictly limited to a radius of approximately 0.5 meters to 1.0 meters, forming a so-called geofence. This characteristic enables signal detection to have a clear boundary: when a user stands within the detection range, the signal can be received; when leaving this range, the signal can hardly be received immediately. The composition of the geofence includes: an area centered on the wireless AP with the signal coverage area as the radius. This highly discrete "binary" (detected / not detected) characteristic no longer relies on a complex signal strength attenuation model, but provides deterministic position reference point information. Tests in different environments show that the coverage ranges of the same wireless AP at different transmit powers vary significantly: at a transmit power of -40 dBm, the typical coverage radius is about 0.6 meters; at a transmit power of -30 dBm, the coverage radius can reach about 1.5 meters; while at a standard transmit power of 0 dBm, the coverage radius may exceed 20 meters. Therefore, for different deployment environments, the transmit power can be flexibly adjusted to balance the coverage range and signal determinacy. For example, in open areas such as corridors, a lower transmit power (such as -40 dBm) can be adopted to ensure high precision; while at positions such as entrances where a slightly larger coverage range is required, the transmit power can be appropriately increased to -35 dBm.

[0023] The deployment method of geofence points also has high flexibility. In actual implementation, it is preferred to install wireless APs at key positions in the indoor environment, such as both sides of door frames, the edges of workbenches, stairways, etc., which are the positions that users must pass through or commonly use. This deployment strategy enables the system to provide precise references at key positions without the need for dense coverage of the entire space, significantly reducing the deployment density and cost, while improving the determinacy of position references. In actual deployment experience, deploying 3 - 5 wireless APs per 100 square meters of space can already provide sufficient position references, while traditional RSSI positioning methods usually require 10 - 15 access points to achieve a similar coverage effect.

[0024] The system supports multiple types of devices as geofence points, including but not limited to wireless APs, UWB tags, Wi-Fi beacons, etc., and realizes similar geofence detection characteristics by configuring different transmit powers and receive sensitivity thresholds, enhancing the applicability and compatibility of the system.

[0025] At the system design level, the geofence point model is simplified to: when the signal of wireless AP ID is detected i , the user's position x satisfies the constraint condition , where is the wireless AP iThe installation location, is the effective detection radius (0.5 meters to 1.0 meters). This simple and definite constraint is directly integrated into the factor graph optimization framework to provide accurate position calibration for the PDR trajectory and effectively suppress long-term cumulative errors.

[0026] Step S2: Preprocess the inertial sensor data collected by the IMU sensor group built into the pedestrian terminal device, and calculate the attitude quaternion of the terminal device in the global coordinate system.

[0027] Using the IMU sensor group built into the terminal device carried by the pedestrian (such as smartphones, tablets, smart watches, other smart wearable devices, etc.), continuously collect the data of the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer at a high frequency (adjustable from 50Hz to 200Hz, typical value is 100Hz), which is commonly referred to as inertial sensor data. These raw sensor data will be used as the input of the pedestrian dead reckoning (PDR) technology for subsequent generation of the initial pedestrian movement trajectory.

[0028] Then preprocess the inertial sensor data. The preprocessing includes operations such as noise filtering and zero bias compensation to ensure data quality. In the noise filtering stage, a combination of sliding median filtering and low-pass filtering is used, which can effectively suppress high-frequency noise and retain the dynamic characteristics of the signal; zero bias compensation uses a combination of static calibration and dynamic tracking to regularly update the sensor zero bias value and reduce the influence of temperature drift caused by long-term operation, providing high-quality input data for subsequent attitude calculation and step detection.

[0029] Based on the preprocessed data of the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer in this embodiment, an optimized implementation of the Mahony and Madgwick complementary filters is applied for lightweight attitude calculation. This optimized implementation improves the stability of attitude estimation in fast motion states by adjusting the error state feedback control parameters. This complementary filter represents the attitude using quaternions, fuses the data of the accelerometer, gyroscope, and magnetometer, and realizes stable attitude calculation through error state feedback control.

[0030] Its core state update equation is: where, represents the attitude quaternion in the global coordinate system, represents the rotation quaternion from the sensor coordinate system to the earth coordinate system, represents the angular velocity measured by the gyroscope, is the scaling factor, with a value range of 0.01 to 0.1, is the gradient function. Represents the magnitude or norm of the gradient function, which is used to evaluate the error magnitude and normalize the gradient direction, and is used to adjust the correction strength of the filter during the pose estimation process.

[0031] The complementary filter takes the preprocessed sensor data as input and outputs the pose quaternion of the device in the global coordinate system, providing a direction reference for subsequent step detection and trajectory calculation.

[0032] Step S3: Generate an initial pedestrian motion trajectory through pedestrian dead reckoning.

[0033] Pedestrian dead reckoning (PDR) is a relatively mature technology, and this embodiment has been improved on the basis of traditional pedestrian dead reckoning technology.

[0034] In a specific embodiment, the generating an initial pedestrian motion trajectory through pedestrian dead reckoning includes: Step 3.1: Perform adaptive zero-speed interval detection to determine the zero-speed interval.

[0035] This step performs adaptive zero-speed interval detection based on the preprocessed triaxial accelerometer and triaxial gyroscope data. This step analyzes the variation characteristics of the acceleration and angular velocity data to identify the stationary phase in the pedestrian gait. Specifically, it includes: Construct a dual-threshold adaptive decision-making model based on the acceleration variance and the magnitude of the angular velocity , including: Static acceleration criterion: ; where is the adaptive threshold of the acceleration variance, and the initial typical value is 0.05 m / s , which is dynamically adjusted according to the user's walking pattern; Static angular velocity criterion: ; where is the adaptive threshold of the angular velocity magnitude, and the initial typical value is 0.1 rad / s, which is dynamically adjusted according to the user's motion state; When both of these criteria are satisfied, it is determined that the current moment is in the zero-speed state.

[0036] The dual-threshold adaptive decision-making model in this embodiment can dynamically adjust the detection threshold according to the user's motion state, significantly improving the accuracy and robustness of zero-speed detection. Through adaptive zero-speed interval detection, the zero-speed interval (including the start time and end time) in the pedestrian motion process can be determined, which will be used for speed error correction and step detection in the subsequent steps.

[0037] Next, perform speed error correction.

[0038] When it is determined to be a zero speed zone, the speed reset operation is performed: ; Calculate the velocity error: ; Update the state covariance matrix: ,in is the Kalman gain, is the observation matrix.

[0039] Among them, speed The current moment k The estimated speed of the pedestrian in the global coordinate system is Indicates the estimated value of the speed at the last moment. The speed zeroing operation in the zero speed state is the core of the zero speed update technology (ZUPT). By forcing the speed in the stationary state to zero, the drift error accumulation in the integration process is prevented. Speed Error After calculation, it is used for state feedback correction to correct the accumulated error of IMU. And the state covariance matrix is updated It is a key step in the Kalman filter framework, used to quantify the uncertainty of state estimation, provide confidence weights in subsequent filtering and data fusion processes, and ensure that the impact of different information sources can be dynamically adjusted according to measurement reliability. This process directly affects the accuracy of step detection and trajectory generation, and is a key technology to suppress the long-term error accumulation of PDR.

[0040] This embodiment also periodically updates the adaptive threshold, and periodically updates the threshold parameter according to the following formula: in, is the updated acceleration variance adaptive threshold, is the updated angular velocity modulus adaptive threshold, is the acceleration variance adaptive threshold before updating, is the angular velocity modulus adaptive threshold before updating, and is the smoothing factor, ranging from 0.8 to 0.95, and It is an adaptive function based on the distribution of historical data. For example, for users with stable gait, the threshold is lowered to improve detection sensitivity; for users with intense exercise, the threshold is appropriately increased to avoid false detection. The update cycle is usually set to evaluate every 100-300 steps or 15-30 minutes, which can effectively adapt to changes in user movement patterns and differences between different users, significantly improving the accuracy of zero-speed detection and the adaptability to different users.

[0041] In experiments with a diverse user group (including testers of different ages, heights, and weights), compared with the fixed threshold method, the adaptive zero-speed detection of this application shows significant advantages in different users, different walking speeds, and different scenarios. In standard tests, the zero-speed detection accuracy has increased by more than 20%. Especially in challenging scenarios such as fast walking and stair climbing, the improvement effect is more obvious. This high-precision zero-speed detection is directly reflected in the PDR trajectory accuracy. Especially in long-term positioning, it effectively suppresses the cumulative diffusion of speed integration errors. In a 30-minute continuous walking test, the cumulative error using adaptive zero-speed interval detection is about 5 meters, while the cumulative error of the traditional fixed threshold reaches more than 15 meters.

[0042] Step 3.2: Perform step detection and step length estimation to obtain a step sequence.

[0043] This step performs step detection and step length estimation based on the zero-speed interval and the preprocessed acceleration data.

[0044] Specifically, during step detection, when it is determined to leave the zero-speed interval, this is recognized as the end of a complete step.

[0045] The step length estimation model comprehensively analyzes the user's height, current step frequency, and vertical acceleration characteristics, and calculates the step length through the formula where is the user's height, is the current step frequency (calculated based on the time interval between adjacent zero-speed intervals), is the variance of the vertical acceleration, is the parameter calibrated according to historical data. In actual measurements, the average error of this step length estimation model is controlled within ±5%, which is significantly better than the traditional fixed step length model (the error is usually above ±15%).

[0046] At the same time, apply the attitude quaternion to the calculation of the walking direction to determine the direction vector of each step.

[0047] This step obtains a step sequence (including the timestamp, step length, and direction information of each step) based on the input zero-speed interval, preprocessed acceleration data, and attitude quaternion, providing basic data for the generation of the initial pedestrian movement trajectory in the next step.

[0048] Step 3.3: Process each detected step in sequence to generate the initial pedestrian movement trajectory.

[0049] Based on the obtained step sequence and zero-speed interval, process each detected step in sequence. According to the step length and direction information of this step, move forward the corresponding step length from the previous position point in the current direction, update the user's position coordinates, and generate the initial pedestrian movement trajectory.

[0050] The improved method of this embodiment can, to a certain extent, inhibit the accumulation of speed errors, but it cannot completely eliminate the trajectory drift caused by long-term use. Although there are cumulative errors in this trajectory, it provides a basic trajectory framework for subsequent multi-source data fusion.

[0051] Step S4: Obtain the observed data of the geofence points, and optimize the initial pedestrian movement trajectory to obtain the optimized pedestrian movement trajectory.

[0052] In this embodiment, the terminal device is used to scan and detect the geofence point signals in the surrounding environment in real time. Whenever the wireless AP signal deployed in step S1 is detected, the corresponding AP ID and the current timestamp are recorded to form an observed sequence of geofence points. Since the wireless AP is configured in a low-power mode with a small and determined signal coverage range, detecting the signal means that the user's location must be within the coverage radius of the AP (usually in the range of 0.5 meters to 1.0 meters). This characteristic enables each geofence point observation record to provide a high-certainty location constraint condition for the user.

[0053] In a specific embodiment, the obtaining the observed data of the geofence points and optimizing the initial pedestrian movement trajectory includes: Step 4.1: Perform geomagnetic matching closed-loop detection to obtain a list of closed-loop detection results.

[0054] In this step, based on the collected triaxial magnetometer data and the initial pedestrian movement trajectory, an optimized version of the Edit Distance Rate (EDR) geomagnetic matching algorithm is performed for closed-loop detection to identify the locations where the user passes repeatedly. The Edit Distance Rate (EDR) is an algorithm based on edit distance, which is used to measure the similarity between two sequences. Edit distance refers to the minimum number of single-character edit operations required to convert one sequence into another, including insertion, deletion, and replacement operations. In a navigation system, EDR can be used to evaluate the similarity of geomagnetic data to help determine the precise position of the device.

[0055] The traditional EDR algorithm only considers the similarity of the magnetic field sequence itself and is easily affected by mutant geomagnetic interference. The geomagnetic field distribution in the indoor environment has spatial specificity, but it is also easily affected by environmental changes and electronic device interference. This application optimizes the EDR algorithm in two aspects: on the one hand, a weighted edit distance calculation method is introduced to dynamically adjust the matching weight according to the change rate and intensity difference of the magnetic field signal.

[0056] When calculating the edit distance between sequences, the traditional EDR algorithm usually assigns the same weight to insertion, deletion, and replacement operations without considering the characteristics of the magnetic field signal. This application introduces weighted edit distance calculation, that is, different weight coefficients are assigned to deletion, insertion, and replacement operations: Among them, Represents the edit distance between sequences, , and are the weight coefficients for deletion, insertion, and substitution operations respectively, is the improved difference cost function. In this application, these weight coefficients are dynamically adjusted through the magnetic field gradient and fluctuation characteristics.

[0057] Specifically, the weight adjustment is based on the rate of change of the magnetic field strength: . Among them is the magnetic field gradient, is the magnetic field strength vector. In the region where the magnetic field changes violently (i.e., ), the weight of the substitution operation is reduced in the following manner: . Among them is the base weight value (usually taken as ), is the adjustment coefficient (the value range is from to ). At the same time, the deletion weight and insertion weight are increased in these regions: Among them the value range is to .

[0058] In addition, a local tolerance window mechanism is set. When a magnetic field mutation point is detected (i.e., , among which is the second-order gradient threshold), within the range of before and after this time point (usually 3 - 5 sampling points), a larger matching tolerance is allowed, which is achieved by adjusting the threshold of the difference cost function . Near metal-frame buildings, mutant magnetic field anomalies are very common, and traditional algorithms are extremely vulnerable to interference. However, the improved EDR algorithm greatly improves the resistance to such interference through weight adjustment and local tolerance window processing.

[0059] On the other hand, a similarity adjustment factor based on the trajectory topology structure is added, enabling the matching process to consider both magnetic field characteristics and spatial structure characteristics simultaneously, reducing the interference of mutant geomagnetic signals.

[0060] The sequence similarity score calculation in the geomagnetic matching closed-loop detection of this embodiment is: ; Among them represents the weighted edit distance between sequences and , is the similarity adjustment factor based on the trajectory topology structure, , among which Represents the topological structure difference metric between two trajectories. and represents the sequence and the sequence lengths, that is, the number of magnetic field sampling points each contains, and is used to normalize the edit distance so that the similarity between sequences of different lengths is comparable.

[0061] When is greater than the preset threshold (value range 0.7 to 0.85), it is determined that the closed-loop matching is successful. This ensures that the matching is not only based on the similarity of magnetic field intensities but also takes into account the consistency of the motion pattern, significantly reducing the probability of false matching caused by random magnetic field interference. For example, even if the magnetic field characteristics of two trajectories are similar, but if the motion patterns are completely different (such as one is a straight walk and the other contains multiple turns), the matching confidence will be automatically reduced.

[0062] The list of closed-loop detection results obtained through closed-loop detection contains the start and end indices, similarity scores, and corresponding position constraints of each pair of matching trajectory segments. These closed-loop constraints will be used in subsequent factor graph optimization to correct trajectory drift. Experiments show that the optimized algorithm increases the closed-loop matching success rate from 70% to over 90%, significantly improving the system's ability to identify the user's repeated positions.

[0063] Step 4.2: Based on the initial pedestrian motion trajectory, geofence point observation data, and the list of closed-loop detection results, construct a multi-source data fusion factor graph model.

[0064] Based on the previously obtained initial pedestrian motion trajectory, geofence point observation data, and geomagnetic closed-loop detection results, construct a MiniSAM factor graph model (factor graph least squares optimization framework) to achieve the probabilistic fusion of multi-source data. MiniSAM is a lightweight graph optimization framework, and this application has carried out targeted optimization on it to meet the specific requirements of indoor positioning.

[0065] The factor graph model contains four main types of factors: PDR factor (representing the relative motion constraint between adjacent position points), geofence point factor (representing the absolute position constraint when the user is within the coverage range of a specific AP), geomagnetic closed-loop factor (representing the constraint that the user repeatedly passes through the same position), and map constraint factor (ensuring that the trajectory conforms to the physical space structure).

[0066] The optimization objective function is: ; where represents the set of state variables (mainly the positions of the user at different times), represents the residual of the i-th factor, Represents a robust kernel function used to suppress the influence of abnormal measurement values.

[0067] The robust optimization is achieved by using the Dynamic Covariance Scaling (DCS) method, which can adaptively adjust the influence degree of outliers. During the data fusion process, the system adopts a differential weight strategy: the geofence point factor has a higher weight (the diagonal elements of the covariance matrix are usually set to 0.1 - 0.3) to ensure position accuracy, the weight of the PDR factor is dynamically adjusted over time to reflect the growth of cumulative error, the weight of the geomagnetic closed-loop factor is positively correlated with the matching score to reflect the credibility differences of different closed loops, and the map constraint factor ensures that the trajectory does not cross physical obstacles.

[0068] The input of this step is the initial PDR trajectory, the geofence point observation sequence, and the closed-loop detection result, and the output is the constructed factor graph model, which contains all position state variables and various constraint factors, providing a mathematical basis for the next step of trajectory optimization.

[0069] Step 4.3: Optimize and solve the constructed multi-source data fusion factor graph model to obtain the optimized pedestrian motion trajectory.

[0070] This embodiment applies the incremental Levenberg - Marquardt algorithm for optimization and solution to obtain a globally consistent optimal trajectory estimate. Traditional batch optimization methods need to recalculate the entire trajectory every time new data is added, and the computational complexity increases sharply with the increase of the trajectory length. The incremental optimization method adopted in this application only locally updates the variables affected by the newly added observation data, significantly improving the computational efficiency and enabling the system to support real-time or near-real-time trajectory updates.

[0071] Specifically, first construct a sparse Jacobian matrix and information matrix, and then obtain the state increment by iteratively solving the linear equations to update the trajectory estimate. During the optimization process, a dynamically adjusted robust kernel function threshold parameter , is updated through the formula , where is the smoothing factor (the value range is 0.8 to 0.95), and is an adaptive function based on the historical data distribution. This adaptive mechanism can effectively suppress the influence of abnormal measurements and improve the robustness of trajectory optimization, especially performing well in cases of strong environmental interference or sudden changes in the user's motion pattern.

[0072] Finally, the optimized pedestrian motion trajectory (including timestamps and the corresponding position coordinate sequence) is obtained. This trajectory comprehensively considers various information such as PDR inference, geofence point constraints, closed-loop detection, and map constraints, significantly improving the positioning accuracy and trajectory smoothness.

[0073] Another embodiment of the present application further includes: Physically constrain the optimized pedestrian movement trajectory to obtain a physically constrained corrected trajectory.

[0074] In this embodiment, post-processing is performed on the optimized pedestrian movement trajectory. An indoor environment adaptation version of the informed-RRT path planning algorithm is applied, combined with prior map information, to generate a physically feasible path. The traditional RRT algorithm faces problems of low search efficiency and poor path quality in complex indoor environments. This embodiment makes two improvements to it: First, a heuristic sampling strategy is introduced. By restricting the generation area of random sampling points to an elliptical area around the optimized trajectory, with the starting point and the ending point as the foci, this ellipse covers the reasonable deformation space of the original trajectory. This method significantly reduces the exploration of irrelevant areas by the algorithm, making the search more targeted and concentrated within the possible solution space, and significantly improving the sampling efficiency. Second, the collision detection algorithm is optimized. By preprocessing the indoor map to construct a spatial index structure and combining it with a detection result caching mechanism, repeated calculations are reduced. The system temporarily stores and quickly queries the collision detection results for continuously adjacent positions, avoiding repeated verification of the same area, which is especially suitable for processing data such as pedestrian trajectories that usually have spatial continuity. These two improvements enable the algorithm to better approximate the overall shape of the original optimized trajectory while maintaining physical feasibility, providing an efficient path planning solution for complex indoor environments, with a processing speed 5 - 10 times faster than traditional algorithms.

[0075] The improved algorithm can complete path planning within 50 milliseconds for complex indoor environments containing multiple rooms and corridors, with a speedup of 5 - 10 times compared to traditional algorithms. This embodiment uses this algorithm to correct the optimized trajectory into a physically constrained feasible path, ensuring that the trajectory does not cross obstacles such as walls while maintaining the overall shape of the trajectory consistent with the optimization result. This embodiment obtains a physically constrained corrected trajectory, which not only maintains the positioning accuracy but also ensures physical feasibility, eliminates unreasonable phenomena such as passing through walls, and further improves the practicality of the positioning result.

[0076] Another embodiment of the present application further includes: Smooth the physically constrained corrected trajectory to obtain a smoothed pedestrian movement trajectory.

[0077] In this embodiment, the physically constrained correction trajectory is smoothed to make it more in line with human kinematic characteristics. The cubic spline interpolation algorithm is used to smooth the trajectory. This algorithm constructs continuous cubic polynomial curve segments to connect the key points on the trajectory, ensuring that the curve has continuous first and second derivatives at the connection points, thus generating a smooth and natural transition. During the smoothing process, different tension coefficients are adopted for key turning points to retain the characteristics of the trajectory corners while eliminating sharp corners and unnatural jumps. This processing method is particularly effective in complex motion patterns such as when the user makes a sharp turn or goes up and down stairs, which can convert the sharp corners in the original trajectory into natural and smooth curves while keeping the basic shape and spatial position of the trajectory unchanged. Trajectory smoothing not only improves the visual presentation effect but also eliminates the high-frequency jitter introduced by sensor noise and fusion algorithms, making the trajectory more in line with human kinematic characteristics. The smoothed pedestrian motion trajectory will be used for subsequent visualization and location services. Through the smoothing process, the generated trajectory can more accurately reflect the actual motion path of the user, enhancing the user's intuitive perception and usage experience of the positioning result.

[0078] Another embodiment of this application further includes: Perform trajectory quality assessment on the smoothed pedestrian motion trajectory and calibrate the pedestrian motion trajectory according to the quality assessment score.

[0079] This embodiment conducts a comprehensive quality assessment on the smoothed trajectory to ensure that the final positioning result meets the application requirements. The quality assessment includes multiple dimensions: First, trajectory coherence assessment, which checks whether there are unreasonable jumps or breakpoints in the trajectory; second, trajectory smoothness assessment, which calculates the curvature change rate to ensure that the trajectory conforms to human kinematic constraints; third, physical rationality assessment, which verifies the fit between the trajectory and the indoor map to ensure that there are no physically impossible paths such as passing through walls; finally, accuracy assessment, which compares the trajectory with the known positions of geofence points and calculates the trajectory deviation. Finally, a comprehensive quality score is generated according to the assessment results. When the score is lower than the preset threshold, the trajectory calibration process will be automatically triggered.

[0080] The calibration process is divided into three progressive levels according to the trajectory quality assessment results: Mild calibration only adjusts the parameters in the smoothing process, including adjusting the cubic spline interpolation tension coefficient and smoothing weight described above, and adjusts the curve transition characteristics while keeping the overall shape of the trajectory unchanged, improving the smoothness and naturalness of the turning points; Medium calibration re-executes the two complete steps of physical constraint and smoothing. During the physical constraint process, more stringent conditions are adopted, increasing the safety distance from the obstacle edge and reducing the path deviation tolerance to ensure the consistency of the trajectory with the actual physical environment; Severe calibration returns to step S4 described above (the step of optimizing the trajectory by obtaining the geofence point observation data). By readjusting the weights of various factors in the multi-source data fusion factor graph model in step 4.2, specifically including increasing the weight contributions of the geofence point factor and the map constraint factor, reducing the weight of the PDR factor as time goes by, and introducing additional map topology constraints for the detected low-quality trajectory segments, such as prior constraints like corridor centerlines and conventional paths, and then re-executing the factor graph optimization and solution process in step 4.3 to fundamentally improve the matching degree between the trajectory and the actual walking path. This multi-level calibration mechanism can adopt corresponding correction strategies according to the severity of the problem and achieve a balance between computing resources and accuracy requirements.

[0081] This embodiment iteratively executes the calibration-evaluation loop until the trajectory quality meets the requirements or the maximum number of iterations is reached. The input of this step is the smoothed trajectory and the indoor environment map, and the output is the final trajectory that has undergone quality assessment and necessary calibration, as well as the corresponding quality assessment report. This strict quality control mechanism ensures that the system can maintain high positioning accuracy even in complex and changing indoor environments and provides reliable location services for users.

[0082] This application implements an indoor positioning method that fuses general geofencing and inertial navigation. This method realizes a high-precision, low-cost, and easy-to-deploy indoor positioning solution under the condition of sparse deployment of anchor devices, overcoming the technical problems faced by traditional indoor positioning technologies, such as poor scalability, insufficient robustness, large cumulative errors, and high deployment costs.

[0083] In a specific embodiment, the applicant deployed 450 wireless APs as geofence points in a large shopping mall (with an area of approximately 15,000 square meters and including 4 floors), mainly installed at key locations such as main entrances and exits, elevator entrances, staircase entrances, and store entrances. A detailed indoor map of the shopping mall was configured, including fixed facilities such as walls, columns, and escalators, as well as the division of store areas. Each wireless AP was configured with a transmission power of -40 dBm and a battery life of approximately 18 months, greatly reducing the maintenance cost. An indoor navigation service based on a mobile application was provided to customers, supporting functions such as finding specific stores, restaurants, and restrooms, and providing the optimal path navigation. During the 6-month operation process, the average positioning error was 1.3 meters, and the positioning error of 95% did not exceed 2.8 meters, enabling accurate guidance of users to their destinations, and the navigation success rate reached over 98%. Compared with the Wi-Fi fingerprint positioning system previously adopted by the shopping mall (with an average error of 3.2 meters and a deployment cost of approximately 500,000 yuan), the technical solution of this application not only improved the accuracy by nearly 60%, but also reduced the deployment cost by approximately 70%, and significantly reduced the operation and maintenance cost. The performance during the peak period (with a pedestrian flow density of about 0.8 people per square meter) was also stable, and the positioning accuracy only decreased by about 12%, showing good environmental adaptability.

[0084] Compared with other mainstream indoor positioning technologies, this application has achieved a good balance in terms of accuracy, cost, and ease of deployment. Under the same deployment density conditions (3 - 5 wireless APs per 100 square meters), the positioning accuracy of this system is significantly better than that of the Wi-Fi fingerprint method (typical error 3 - 5 meters) and the pure PDR method (error over 10 meters in the long term), approaching that of the high-cost UWB system (typical error 0.3 - 1 meter), while the deployment cost and complexity are only about 1 / 10 of the UWB system. Specifically, taking an office area of 1,000 square meters as an example, the total deployment cost of this application is approximately 10,000 - 20,000 yuan (including 30 - 50 wireless APs), while the cost of the UWB system is around 100,000 - 200,000 yuan (including 8 - 12 UWB base stations and related equipment).

[0085] This application also shows excellent environmental adaptability. In the pedestrian flow density change test, even under peak period conditions (0.5 people per square meter), the positioning accuracy decreases by no more than 15%; in the small furniture movement test, the performance is hardly affected; after large-scale environmental transformation, it can recover to over 85% of the original accuracy level within a short period (usually 5 - 10 minutes) through an adaptive update mechanism.

[0086] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. An indoor positioning method that fuses general geofencing and inertial navigation, characterized in that, The indoor positioning method that fuses the general geofence and inertial navigation includes: Deploy low-power mode wireless access points as geofence points in indoor application scenarios; Preprocess the inertial sensor data collected by the IMU sensor group built into the pedestrian terminal device, and calculate the attitude quaternion of the terminal device in the global coordinate system; Generate an initial pedestrian movement trajectory through pedestrian dead reckoning; Obtain the geofence point observation data, optimize the initial pedestrian movement trajectory, and obtain the optimized pedestrian movement trajectory.

2. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 1, wherein The effective detection range of the geofence point is within a radius of 0.5 meters to 1.0 meters.

3. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 1, characterized in that, To calculate the attitude quaternion of the terminal device in the global coordinate system, the Mahony and Madgwick complementary filters are used for calculation.

4. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 1, characterized in that, The generation of the initial pedestrian movement trajectory through pedestrian dead reckoning includes: Perform adaptive zero-velocity interval detection to determine the zero-velocity interval; Perform step detection and step length estimation to obtain a step sequence; Process each detected step in sequence to generate the initial pedestrian movement trajectory.

5. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 4, characterized in that, The adaptive zero-velocity interval detection includes: Construct a dual-threshold adaptive decision model based on the variance of acceleration and the magnitude of angular velocity , where: Static acceleration criterion: ; Static angular velocity criterion: ; Among them, is the adaptive threshold of acceleration variance, is the adaptive threshold of angular velocity modulus; When both of the above two criteria are met, it is determined that the current moment is in a zero-velocity state.

6. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 5, wherein The adaptive variance threshold of acceleration and the adaptive threshold of angular velocity modulus are updated periodically, and the update formula is as follows: wherein, is the updated adaptive threshold of acceleration variance, is the updated adaptive threshold of angular velocity modulus, is the adaptive threshold of acceleration variance before update, is the adaptive threshold of angular velocity modulus before update, and is the smoothing factor, and is the adaptive function based on historical data distribution.

7. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 1, characterized in that, The obtaining of the geofence point observation data, the optimization of the initial pedestrian movement trajectory, and the obtaining of the optimized pedestrian movement trajectory include: Execute geomagnetic matching closed-loop detection to obtain a list of closed-loop detection results; Based on the initial pedestrian movement trajectory, the geofence point observation data, and the list of closed-loop detection results, construct a multi-source data fusion factor graph model; Optimize and solve the constructed multi-source data fusion factor graph model to obtain the optimized pedestrian movement trajectory.

8. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 7, characterized in that, The geomagnetic matching closed-loop detection includes: When calculating the edit distance between sequences, different weight coefficients are assigned to deletion, insertion, and replacement operations; Moreover, the sequence similarity scoring formula in the closed-loop detection is: ; where represents the weighted edit distance A between sequences is the similarity adjustment factor and represent the lengths of sequences A and B respectively.

9. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 1, wherein The indoor positioning method that fuses the general geofence and inertial navigation also includes: Perform physical constraints on the optimized pedestrian movement trajectory to obtain a physically constrained corrected trajectory; Perform smoothing processing on the physically constrained corrected trajectory to obtain a smoothed pedestrian movement trajectory.

10. The indoor positioning method by fusing general geofencing and inertial navigation according to claim 9, wherein, The indoor positioning method that fuses the general geofence and inertial navigation also includes: Perform trajectory quality assessment on the smoothed pedestrian movement trajectory, and calibrate the pedestrian movement trajectory according to the quality assessment score.