Robust pedestrian dead reckoning method and device based on geomagnetic self-adaption and time-frequency pace fusion
By employing a robust pedestrian dead reckoning method that integrates multi-scale geomagnetic quality assessment and time-frequency gait fusion, the problems of unstable gait detection, unsuitable gait length estimation, and easy course drift in traditional PDR under complex indoor environments are solved, achieving high-precision, low-drift positioning in weak GNSS environments.
Patent Information
- Application Number
- CN202511789052.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-03
AI Technical Summary
Existing pedestrian dead reckoning (PDR) technology faces problems such as unstable step detection, lack of dynamic adaptability in step length estimation, easy jumps and serious drift in geomagnetic heading, and lack of long-term error convergence mechanism in global trajectory under complex indoor and weak GNSS environments, making it difficult to meet the needs of long-term continuous positioning.
A multi-scale geomagnetic quality assessment model is used for adaptive judgment and quality classification. Combined with time-frequency step fusion and residual feedback mechanism, a robust pedestrian dead reckoning method is constructed. Through a closed-loop process of multi-source inertial and geomagnetic information, robust step event detection, adaptive step size estimation and robust heading fusion are achieved, and a closed-loop system of "detection-identification-estimation-correction-fusion" is constructed.
It significantly improves trajectory continuity and positioning accuracy in environments with strong magnetic interference, frequent gait changes, and complex indoor conditions, while maintaining low drift and high robust dead reckoning performance. It is suitable for smart terminals in indoor navigation and continuous positioning scenarios.
Smart Images

Figure CN121594878A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mobile positioning and intelligent navigation technology, specifically relating to a robust pedestrian dead reckoning (PDR) method and device based on geomagnetic adaptation and time-frequency gait fusion. This method can operate on smartphones, smartwatches, wearable terminals, and other mobile devices with inertial and geomagnetic sensing capabilities. It is suitable for continuous pedestrian relative positioning and trajectory calculation in indoor, underground spaces, complex building structures, and weak Global Navigation Satellite System (GNSS) environments. Background Technology
[0002] With the rapid growth in demand for applications such as indoor navigation, shopping mall navigation, emergency evacuation in underground spaces, intelligent inspection, and sports and health monitoring, positioning methods relying solely on GNSS are no longer sufficient to support continuous positioning across outdoor, indoor, and underground environments. Pedestrian Dead Reckoning (PDR), due to its ability to operate locally and in real-time on smartphones and wearable devices without external infrastructure, has become an important positioning technology for weak GNSS or satellite-free environments. However, in real-world scenarios, traditional PDR still faces several key technical bottlenecks:
[0003] (1) Grace detection is not robust enough under noise, gait changes and posture randomization.
[0004] Traditional methods often rely on peak and valley detection, signal correlation, state machines, or lightweight models to identify steps. However, real-world scenarios commonly involve stopping and starting, acceleration and deceleration, going up and down stairs, switching hands to hold a phone, and changing postures such as pocket / handheld / arm swinging, causing acceleration signals to exhibit significant non-stationary characteristics. Under conditions of high noise and posture randomization, step events are prone to missed detection, false detection, or trigger point shifts, thereby disrupting the time reference and causing step length estimation and trajectory recursion to become synchronously unstable, making it impossible to maintain consistency across scenarios.
[0005] (2) Step size estimation lacks dynamic adaptability and online error convergence capability.
[0006] Existing stride length models are mostly based on empirical formulas, linear regression of acceleration features, or offline trained networks. Their parameters are often fixed or weakly adaptive, making it difficult to cope with the dynamic fluctuations in gait caused by changes in speed, scene, and carrying method. More importantly, these methods generally lack an online correction mechanism that combines "prediction-observation-residual feedback," and cannot actively constrain stride length using trajectory deviations. This allows errors to accumulate continuously during long-term walking, which is especially prone to causing significant drift and global structural distortion in large-scale indoor walking tasks.
[0007] (3) Geomagnetic observations are significantly affected by environmental disturbances, leading to unstable heading estimates.
[0008] In areas such as shopping malls, subway stations, underground parking lots, and elevator shafts, numerous steel structures, electrical equipment, and power facilities can generate strong geomagnetic disturbances, causing the magnetic field magnitude and direction to deviate from their normal distribution. Traditional methods of directly using magnetometers for heading estimation or gyroscope drift correction rely on geomagnetic stability; however, encountering abnormal magnetic measurements can easily lead to heading jumps, slow deviations, or trajectory distortions. Although some methods incorporate short-term gyroscope prediction, they generally lack a systematic "disturbance detection—measurement screening—weight adaptive adjustment" mechanism, making it difficult to maintain long-term reliability of heading calculations in complex magnetic environments.
[0009] (4) Lack of a robust PDR closed-loop framework that is consistent across modules.
[0010] Existing work mostly focuses on improving a single module (step, step length, or heading), lacking a holistic design that starts from "geomagnetic disturbance identification—step robust detection—step length adaptive estimation—heading robust fusion—state optimization output." Loose coupling between modules and a lack of error complementarity and consistency constraints prevent the system from forming an effective error control closed loop, resulting in weak overall robustness, poor cross-scenario generalization ability, and difficulty in meeting the requirements of real continuous navigation.
[0011] In summary, existing PDR systems generally face problems such as poor robustness of step detection, lack of dynamic adaptation in step size estimation, easy jumps and serious drift in geomagnetic heading, and lack of long-term error convergence mechanism in global trajectory under complex indoor and weak GNSS environments. At present, there is still a lack of a systematic PDR solution that is truly oriented towards real-world environments and takes into account feasibility, stability and long-term accuracy.
[0012] To address the aforementioned issues, this invention proposes a robust pedestrian dead reckoning method and apparatus based on geomagnetic adaptation and time-frequency gait fusion. By unifying multi-scale geomagnetic disturbance detection and quality grading, time-frequency domain-based robust gait identification, residual feedback-based adaptive step size update, and geomagnetic quality-controlled heading angle fusion, an integrated PDR solution system of "detection-identification-estimation-correction-fusion" is constructed. This system can operate stably for extended periods in complex building structures, weak satellite signal areas, and environments with strong magnetic interference, outputting smooth, continuous, and low-drift pedestrian trajectories. This significantly improves the accuracy, robustness, and practical usability of smart terminals in indoor navigation and continuous positioning scenarios. Summary of the Invention
[0013] Given the four core problems commonly encountered by existing pedestrian dead reckoning (PDR) technologies in complex indoor and weak GNSS environments—including unstable detection of gait events under strong noise and attitude changes, lack of dynamic adaptability in stride length estimation, unreliable heading due to environmental disturbances in geomagnetic measurements, and lack of an effective convergence mechanism for overall errors—traditional PDR is insufficient to meet the requirements for positioning accuracy and system robustness in long-term continuous walking scenarios. Therefore, this invention proposes a robust pedestrian dead reckoning method, device, electronic equipment, storage medium, and computer program product based on geomagnetic adaptation and time-frequency gait fusion.
[0014] This invention first constructs a multi-scale geomagnetic quality assessment model to achieve adaptive judgment and quality classification of magnetometer measurement reliability. It then utilizes Discrete Short-Time Fourier Transform (STFT) to extract stable time-frequency energy features from acceleration sequences, achieving robust gait event detection under complex motion patterns and attitude changes. In the step length estimation module, an adaptive update mechanism based on residual feedback is introduced, enabling the step length parameter to converge online with gait changes, velocity fluctuations, and individual differences. Finally, a geomagnetic quality-driven adaptive fusion strategy for heading angle is employed to suppress the disruption of heading by abnormal magnetic measurements in the presence of significant geomagnetic disturbances, maintaining the smoothness and long-term stability of the heading calculation. These modules form a closed-loop system of "detection-identification-estimation-correction-fusion" within a unified recursive state estimation framework, achieving robust and coordinated estimation of gait, step length, and heading, and continuously suppressing the accumulation of overall trajectory errors.
[0015] Through the above technical solutions, this invention can significantly improve trajectory continuity, positioning accuracy, and long-term stability in typical scenarios such as strong magnetic interference, frequent gait changes, stop-and-go walking, randomized carrier posture, and complex indoor structures. It also maintains low drift and high robustness in dead reckoning performance in indoor, underground, and semi-outdoor environments with weak satellite signal coverage, demonstrating good engineering usability and environmental adaptability. Furthermore, this invention provides corresponding devices, electronic devices, storage media, and computer program products that can run on smart terminals or embedded platforms to support the efficient implementation and industrial application of the aforementioned robust PDR method.
[0016] I. Overall Technical Solution and System Flow
[0017] This invention constructs a highly robust and adaptive pedestrian dead reckoning system for mobile devices such as smartphones and wearable terminals. Based on multi-source inertial and geomagnetic information, the system achieves stable trajectory reckoning in complex environments through a closed-loop process of "detection-identification-estimation-correction-fusion". The overall technical approach includes the following six core steps:
[0018] (1) Multi-sensor data preprocessing and attitude calculation
[0019] Data from the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer are time-synchronized, noise-filtered, outlier-removed, and gravity-separated to establish a coordinate system. Continuous and smooth attitude tracking is achieved based on quaternions or the Direction Cosine Matrix (DCM), constructing a dynamically consistent reference coordinate system and providing a reliable foundation for subsequent gait event detection and heading fusion. Simultaneously, by applying constraint smoothing and short-term stability correction to the attitude calculation process, projection errors caused by rapid changes in mobile phone attitude can be reduced, improving the system's robustness under unsteady carrying conditions.
[0020] (2) Adaptive determination and quality classification of geomagnetic disturbances
[0021] A geomagnetic disturbance determination mechanism is constructed based on multi-dimensional characteristics such as geomagnetic modulus fluctuation, directional consistency, deviation from the reference geomagnetic model, and frequency domain energy ratio. Temporal detection is performed within a sliding window, dynamically outputting geomagnetic quality level labels such as "available—suspicious—unavailable." These quality labels are used for adaptive weight adjustment of the reliability of magnetometer measurements during heading fusion, effectively suppressing the impact of geomagnetic disturbances on heading estimation. Simultaneously, continuity constraints and short-term smoothing strategies avoid unstable updates caused by frequent jumps in quality labels.
[0022] (3) Robust step event detection based on short-time frequency domain analysis
[0023] To address the issues of missed and false detections in step detection by mobile terminals under conditions of strong noise, non-steady-state walking modes, and changes in carrying posture, this invention utilizes time-frequency energy features constructed using Discrete Short-Time Fourier Transform (STFT) combined with multi-channel acceleration and angular velocity signals in a gravitational reference frame to extract stable step periodic structures and energy abrupt change points, achieving highly robust detection of step events. This method maintains detection stability in various scenarios such as walking, brisk walking, running, and climbing stairs, and effectively reduces the impact of changes in phone posture and non-steady-state noise on step recognition.
[0024] (4) Adaptive step size estimation mechanism based on residual feedback
[0025] A residual feedback mechanism is introduced into the step size estimation module. An adaptive update term for the step size parameter is constructed by comparing the deviation between the PDR predicted position and the multi-source constraint information. The constraint information includes: structural environmental constraints (such as the main direction of the passageway and floor leveling consistency), external positioning calibration information (such as Wi-Fi, Bluetooth, UWB, and visible light positioning), and indoor geographic anchor points based on motion behavior recognition (such as special locations like elevators, escalators, and stairs). Step size residuals are generated based on these deviations, allowing the step size parameter to be adjusted online according to gait changes, speed fluctuations, and individual differences. This forms a closed-loop update process of "prediction-observation-residual feedback," effectively suppressing long-term accumulated errors and enhancing the stability and consistency of the trajectory in complex scenarios.
[0026] (5) Adaptive fusion mechanism of heading angle based on geomagnetic mass drive
[0027] This invention comprehensively utilizes gyroscope-integrated heading and magnetometer-observed heading, and adaptively adjusts the reliability of magneto-aerial measurements based on geomagnetic quality levels: magneto-aerial weights are increased in geomagnetically stable regions to promptly suppress gyroscope drift; in geomagnetically questionable or strongly disturbed regions, magneto-aerial measurements are reduced or even temporarily eliminated, while structural geometric constraints such as corridor main direction and stairwell axis are introduced to maintain heading consistency. To avoid abrupt heading changes caused by direct weight switching, this invention achieves smooth adjustment of magnetometer-observed weights through continuous mapping functions or measurement noise covariance scaling mechanisms, and combines time smoothing and hysteresis strategies to maintain the stability of dynamic weight changes. This mechanism can be directly deployed in real-world environments without relying on specific scenario priors, effectively suppressing heading jumps and cumulative drift caused by geomagnetic disturbances, thereby achieving robust heading calculation across scenarios.
[0028] (6) State estimation and step-level trajectory output
[0029] After each step event is triggered, this invention updates the pedestrian's position in the planar coordinate system using the currently estimated step size and heading increment, generating a continuous sequence of trajectory points that is recursively applied step by step. This sequence constitutes the real-time positioning output of the PDR and can operate independently without external signals. Depending on the application requirements, the recursive trajectory can also be introduced into state estimation frameworks such as Extended Kalman Filter (EKF), Unscented Kalman Filter (UKF), or Factor Graph Optimization (FGO) to fuse with external positioning measurements or structural environmental constraints, thereby further improving the smoothness, consistency, and anti-drift capability of the trajectory. In real-time scenarios, the system primarily updates at the step level to ensure low-latency output; when more prior information or external observation conditions are available, the global consistency of the overall trajectory can be enhanced through backend optimization.
[0030] Through the synergy of the above modules, this invention constructs a lightweight, scalable, and easily engineered robust PDR system that can significantly enhance trajectory continuity, positioning accuracy, and long-term stability in environments with strong magnetic interference, frequent gait changes, randomized carrying posture, and weak signals.
[0031] II. Technical Problem Solved by the Invention
[0032] This invention aims to overcome the shortcomings of existing pedestrian dead reckoning (PDR) technologies in complex indoor and weak GNSS environments, such as poor stability, susceptibility to interference, and insufficient long-term accuracy. It proposes a systematic solution focusing on three core aspects: gait event detection, adaptive gait estimation, and robust heading fusion, primarily addressing the following technical issues:
[0033] (1) The problem of robustly extracting step events under strong noise and non-steady-state walking conditions. Real-world scenarios such as stopping and starting, acceleration and deceleration, going up and down stairs, frequent turning, and random changes in attitude can cause significant noise, drift, and non-steady-state structures in acceleration signals, making traditional step detection based on simple peak values or fixed thresholds prone to missed detections, false detections, and unstable trigger points. This invention aims to solve how to robustly identify the main step frequency and locate the step time sequence boundary based on multi-channel inertial features (such as acceleration in the direction of gravity, horizontal resultant acceleration magnitude, and angular velocity around the direction of gravity) in the navigation coordinate system and time-frequency energy features constructed by discrete short-time Fourier transform (STFT), and extract step events with cross-scene and cross-attitude consistency from complex acceleration sequences, thus laying a stable time reference for step length estimation and heading fusion.
[0034] (2) The problem of online convergence of step length estimation with gait changes, speed fluctuations, and individual differences. Traditional step length models are difficult to dynamically adjust with gait patterns, movement speeds, and individual user differences, and lack an online self-correction mechanism based on "prediction-observation-residual feedback," leading to the continuous accumulation of step length errors during long-term walking, which in turn amplifies the overall trajectory drift. This invention aims to solve how to construct an adaptive step length estimation mechanism based on residual feedback. By comparing the deviation between the PDR predicted position and multi-source constraints (such as the main direction of the passage, floor leveling consistency, external positioning measurements, and indoor geographical anchors such as elevators / escalators / stairs), the step length parameters are corrected in real time, enabling the step length to converge dynamically online with gait changes, posture changes, and individual differences, significantly suppressing accumulated errors and enhancing trajectory stability.
[0035] (3) Robust fusion and dynamic weight adjustment of heading estimation under geomagnetic disturbance conditions. In scenarios such as shopping malls, elevator lobbies, subway stations, and underground parking lots, steel structures and motor equipment can cause strong geomagnetic disturbances, making the magnetometer modulus and direction significantly unstable. Traditional simple thresholds are difficult to reflect the degree of disturbance, making it difficult to coordinate magneto-aerial and gyro integrals. This invention aims to solve how to accurately identify disturbances based on multi-dimensional features such as geomagnetic modulus fluctuations, direction consistency, reference geomagnetic model deviation, and frequency domain energy ratio, and quantify them into "geomagnetic quality levels"; then, based on these levels, dynamically adjust the magneto-aerial weights: strengthen magneto-aerial correction in stable segments, reduce or eliminate magneto-aerial contributions in disturbed segments, and maintain heading smoothness and consistency by combining structural constraints such as corridor direction and stair axis, thereby achieving robust heading calculation across scenarios and over long periods of time.
[0036] III. Key Innovations of this Invention
[0037] Based on the above overall scheme, the main innovations of this invention include, but are not limited to:
[0038] (1) Robust step event detection method based on short-time frequency domain analysis and multi-channel consistency
[0039] To address the issue of strong non-steady-state behavior of indoor acceleration signals under conditions such as noise, attitude changes, stop-and-go transitions, and stair climbing, this invention selects multi-channel signals, including gravity-directed projected acceleration, horizontal resultant acceleration magnitude, and angular velocity around the gravity direction, in the navigation coordinate system after attitude calculation. A time-frequency energy spectrum is constructed by performing a Short-Time Fourier Transform (STFT) in discrete time. The system tracks the main energy peak within the expected step frequency band to obtain the time-varying step frequency and combines envelope extrema and phase changes to locate the step trigger point. Simultaneously, it utilizes multi-channel peak co-occurrence and consistency constraints to suppress noise spurious peaks and attitude abrupt changes, achieving highly robust step event detection against changes in step speed and carrying methods, providing a stable time reference for step length estimation and heading fusion.
[0040] (2) Adaptive step size estimation mechanism based on residual feedback
[0041] This invention constructs an online adaptive update framework of "prediction-observation-residual feedback," enabling step length estimation to automatically adjust with gait rhythm, walking speed changes, and individual differences, while maintaining gradual parameter convergence over long-term operation. The system corrects step length parameters in real time by comparing the deviation between the PDR predicted location and multi-source constraint information (including the main direction of the passage, floor level topology, external positioning measurements, and geographical anchors such as elevators / escalators / stairs obtained through behavior recognition). Simultaneously, it incorporates dynamic factors of gait category and speed changes to enhance update stability, effectively suppressing cumulative step length errors and significantly improving cross-scene consistency and long-term continuous positioning capabilities.
[0042] (3) Adaptive fusion mechanism of heading angle based on geomagnetic disturbance identification
[0043] To address the issues of geomagnetic measurements being susceptible to interference from steel structures and electrical equipment indoors, and the tendency for gyro integrals to drift, this invention constructs a disturbance judgment model based on multi-dimensional characteristics such as geomagnetic modulus fluctuations, directional consistency, reference model deviation, and frequency domain energy ratio. This model categorizes geomagnetic quality into three classes: "usable," "suspected," and "unusable," and uses continuous mapping for quantitative representation. During heading fusion, the magnetic and aerodynamic weights are dynamically adjusted according to this classification: magnetic and aerodynamic corrections are strengthened in stable regions, while magnetic and aerodynamic contributions are attenuated or eliminated in suspicious or disturbed regions. Geometric constraints such as the main corridor direction and stairwell axis are combined to maintain smooth and consistent heading. By employing continuous weight mapping, covariance scaling, and hysteresis strategies to suppress heading jumps, highly robust heading estimation is achieved for long-term operation.
[0044] (4) Unified robust PDR closed-loop solution system
[0045] This invention integrates geomagnetic disturbance identification, time-frequency domain gait robustness detection, residual feedback-based adaptive step size estimation, and heading weight adjustment mechanism into a unified recursive state estimation framework, forming a closed-loop robust PDR solution system centered on "quality perception—residual feedback—adaptive fusion." The modules achieve mutual constraints and collaborative convergence through signal quality adjustment and multi-source residual feedback, enabling the system to maintain low drift and high consistency trajectory estimation performance even under strong magnetic interference, frequent gait changes, randomized attitude carrying, and weak signal environments. Furthermore, this architecture is lightweight and computationally inefficient, allowing direct deployment on smartphones, wearable devices, and embedded platforms, demonstrating excellent engineering feasibility and cross-scenario portability.
[0046] IV. Beneficial Effects
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] (1) Based on the multi-scale gait feature extraction mechanism constructed by short-time frequency domain analysis, the gait periodic structure and local energy mutation can be robustly captured under non-steady-state conditions such as walking and stopping, going up and down stairs, and posture randomization, so as to achieve highly reliable gait triggering across gait and carrying methods, and significantly improve the robustness and continuity of gait recognition.
[0049] (2) Through the adaptive step length estimation mechanism driven by residual feedback, the step length parameter can be dynamically converged online with gait changes, speed fluctuations and individual differences, effectively suppressing the cumulative error in the long-term walking process, so that the step length prediction can maintain consistency and stability in complex structural environments.
[0050] (3) The heading weight control mechanism based on multidimensional geomagnetic disturbance identification can significantly suppress the influence of abnormal magnetic measurements in areas with dense geomagnetic anomalies such as shopping malls, elevators, and subway stations, avoid heading jumps and trajectory distortions, and maintain robust heading calculation performance for a long time and across scenarios in complex magnetic environments.
[0051] (4) The whole system adopts a unified recursive robust PDR framework, which is lightweight and has low computing cost. It can be directly deployed on smartphones, smartwatches and other wearable terminals. It maintains smooth trajectory and low drift in typical indoor spaces such as corridors, stairs and escalators, and has excellent engineering feasibility and industrial application value. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is the overall flowchart of the robust PDR method of the present invention.
[0054] Figure 2 This is a schematic diagram of the functional module structure of the robust PDR device of the present invention.
[0055] Figure 3 This is a schematic diagram of the hardware structure of an electronic device capable of implementing the robust PDR method of the present invention. Detailed Implementation
[0056] Before implementing the Pedestrian Dead Reckoning (PDR) method of this invention, relevant laws and regulations should be followed. Users should be clearly informed of the types of data collected, their scope of use, and application scenarios. Full authorization from users should be obtained before collecting and using data related to motion state and spatial location, such as acceleration, angular velocity, geomagnetism, air pressure, and wireless positioning. This invention adheres to the principles of minimum necessity, purpose limitation, and controllable data security during data collection, processing, and storage to meet the requirements of personal information protection and data security laws and regulations.
[0057] The technical solution of the present invention will be described below with reference to exemplary embodiments. These embodiments are intended to help understand the core idea of the present invention and do not constitute a limitation on the scope of protection of the present invention. Modifications, equivalent substitutions, or module combination adjustments made by those skilled in the art without departing from the spirit of the present invention are all within the scope of protection of the present invention. The terms "first," "second," etc., used in this document are only used to distinguish objects and do not represent order or importance; "comprising" usually indicates an open structure.
[0058] Example 1: Robust Pedestrian Dead Estimation Method Based on Geomagnetic Adaptation and Time-Frequency Pace Fusion
[0059] (I) General Description of the Method
[0060] This embodiment, based on a unified reference coordinate system, provides an overall description of the core algorithm flow and the collaborative mechanism between various modules of the present invention. The present invention proposes a robust pedestrian dead reckoning (PDR) method that integrates adaptive geomagnetic disturbance detection, short-time frequency domain step recognition, residual feedback-driven step size update, and geomagnetic quality-controlled heading fusion. This method can be deployed on smartphones, smartwatches, and wearable terminals to achieve continuous relative positioning without relying on external infrastructure.
[0061] The overall method adopts a unified closed-loop structure of "detection-identification-estimation-correction-fusion", using discrete time step k as the index, and completes the following four core tasks in sequence: (1) Step event detection. Based on short time frequency domain (STFT) analysis, the periodic structure in the acceleration sequence is extracted, and multi-channel peak-valley consistency is combined to achieve robust step triggering across gait and carrying attitude. (2) Step length estimation. First, the feature-driven model obtains the preliminary step length prediction, and then the "prediction-observation" residual feedback is used to make the step length parameter dynamically converge with scene changes, gait changes and individual differences. (3) Heading estimation. Gyro integral provides short-term continuity, and geomagnetic vector provides long-term absolute reference; the fusion weight is adjusted by the geomagnetic disturbance quality level to avoid heading jumps and drifts caused by geomagnetic distortion. (4) Trajectory recursion. Continuous step-level trajectory points are generated based on the step length and heading increment of each step event, and can be jointly optimized with external measurements such as GNSS / Wi-Fi / UWB.
[0062] To maintain long-term stability and cross-scenario migration capability in complex environments, this invention further introduces three key mechanisms: (1) Geomagnetic disturbance adaptive mechanism. Based on modulus shift, direction shift, and short-time frequency domain energy, a disturbance index is constructed to identify typical magnetic field anomaly intervals such as elevators, machine rooms, and high-voltage cables. (2) Step size residual feedback mechanism. Map structural constraints, external positioning, and indoor anchor point information are combined to form a "soft observation," which forms a residual with the PDR predicted position, enabling online and progressive adaptive correction of the step size parameters. (3) Heading quality weight mechanism. The magnetic navigation weight is automatically adjusted according to the geomagnetic quality level, and in severely disturbed sections, heading continuity and smoothness are maintained solely by gyroscopes and structural geometric constraints.
[0063] The modules mentioned above work together within a unified recursive state estimation framework, compensating for and constraining each other to form a highly robust, highly adaptive, and low-drift pedestrian trajectory estimation system.
[0064] (II) Method Flowchart and Step Description
[0065] This embodiment demonstrates the operational flow of the present invention under the complete closed-loop architecture of "detection-identification-estimation-correction-fusion". Figure 2 The diagram illustrates the overall process, showing the sequential relationship and data dependency structure from sensor preprocessing, geomagnetic disturbance detection, gait recognition, step length estimation, heading fusion to trajectory output.
[0066] The method uses a unified discrete time step k as an index, starting with the raw sensor data and processing it step by step through various modules to finally output a continuous step-level trajectory point sequence. The main steps are as follows:
[0067] Step S101: Multi-sensor data preprocessing and attitude calculation
[0068] The method first reads data from multiple sources of sensors on the terminal device, including a three-axis accelerometer, a three-axis gyroscope, a three-axis magnetometer, and optional barometers, Wi-Fi, Bluetooth, and UWB, and performs the following: (1) time synchronization and interpolation resampling to construct a consistent time series; (2) coordinate system one, transforming various observations to the same reference coordinate system; (3) noise suppression and outlier removal; and (4) magnetometer hard iron and soft iron effect calibration. A consistent data stream is constructed through time synchronization, interpolation resampling, and coordinate system one. Subsequently, complementary filtering, Madgwick / Mahony filtering, or quaternion EKF is used to estimate the attitude quaternion q. k Or direction cosine matrix R k And decompose acceleration into gravitational and kinematic components:
[0069]
[0070] in Acceleration in the reference coordinate system R is the acceleration of the device coordinate system. k Let g be the attitude rotation matrix and g be the gravity vector. This step establishes a unified reference coordinate system for subsequent geomagnetic disturbance detection, gait recognition, and motion derivation.
[0071] Step S102: Adaptive Judgment and Quality Classification of Geomagnetic Disturbance
[0072] After obtaining a unified reference coordinate system through attitude calculation, the original magnetometer observations are transformed to this coordinate system, forming a discrete geomagnetic vector sequence B. k To identify magnetic field anomalies caused by facilities such as elevators, motors, and high-voltage cables, this step extracts multiple spatiotemporal features within a sliding time window, constructs a geomagnetic disturbance index, and generates a quality level label based on it for dynamic weight adjustment in subsequent heading fusion.
[0073] (1) Nominal geomagnetic field construction. Within an approximately undisturbed reference window or based on a pre-established regional geomagnetic model, a local reference magnetic field is obtained through moving average:
[0074]
[0075] This reference vector serves as both a benchmark for the magnitude offset and a tool for determining directional deviation.
[0076] (2) Vector offset and intensity anomaly detection
[0077] For any time k, the magnetic field vector m k Define the vector offset:
[0078]
[0079] And the difference in strength:
[0080]
[0081] Calculate D in the sliding window k With ΔB k The mean, standard deviation, and extreme values are calculated, and an adaptive threshold (automatically updated with historical stable periods) is used to determine whether there are persistent or transient disturbances, thus adapting to differences in geomagnetic baselines across different floors and building materials. This adaptive threshold is automatically updated based on statistics from historical stable windows, rather than being a fixed constant, thereby accommodating differences in geomagnetic baselines across different buildings and floors.
[0082] (3) Joint determination of directional consistency and temporal continuity
[0083] After the geomagnetic vectors have been unified to the reference coordinate system, this invention not only detects changes in magnitude but also utilizes directional deviations to enhance recognition robustness. First, the angle between the geomagnetic vectors at adjacent times is calculated:
[0084]
[0085] When θ k An abnormal increase occurred within a short time window, accompanied by D. k Significant deviations can be identified as directional sudden disturbances (such as elevators, motors, local cable currents, etc.). To avoid mistaking isolated single-point noise for disturbances, this step applies a time continuity constraint to the abnormal points. Only when the abnormality is continuous or clustered is the interval marked as a valid disturbance interval.
[0086] (4) Determination of geomagnetic disturbances based on frequency domain characteristics
[0087] To identify periodic disturbances caused by rotating electric machines, power equipment, or high-frequency field sources, this invention uses long sequences of geomagnetic modes.
[0088]
[0089] or any of its channel component sequences Perform a short-time Fourier transform (STFT).
[0090] Let the sliding time window of the STFT be the t-th window, and the sample interval corresponding to the window be...
[0091] W t ={B[k]|k∈[τ]} t ,τ t +L-1]}
[0092] Where L is the window length, τ t Set the starting sample index for this window. For window W... t By performing STFT, the local spectrum within the t-th time window can be obtained.
[0093] STFT(B)[t,f]
[0094] Therefore, the frequency domain energy of the t-th time window can be obtained as follows:
[0095]
[0096] like When the frequency bands (especially high-frequency bands or specific mechanical harmonics) are significantly higher than the normal walking background noise, a frequency-domain geomagnetic disturbance is determined to exist in the t-th time window. Subsequently, this frequency-domain anomaly information is correlated with the spatial offset D. k , Direction change angle θ k The results are combined into a geomagnetic disturbance index, which is used for weight adjustment in subsequent quality classification and heading fusion.
[0097] (5) Geomagnetic disturbance index and quality classification
[0098] By combining spatial offset, abrupt directional changes, and frequency domain energy characteristics, this invention constructs a geomagnetic disturbance index:
[0099]
[0100] Where σ |B| The standard deviation of the modulus. Let E be the variance of the geomagnetic direction, Δ|B| be the amplitude variation between windows, and E be the amplitude variation between windows. HF For high-frequency energy, Δ ref To account for the deviation from the reference geomagnetic field, α i (i = 1, 2, ..., 5) are the weighting coefficients.
[0101] Based on the disturbance index, the geomagnetic quality of the current window is divided into the following categories by setting multiple threshold levels: (1) Level I: High-quality geomagnetic segment (weak disturbance, can be stably used for heading observation); (2) Level II: Suspicious geomagnetic segment (slight disturbance, observation weight needs to be reduced); (3) Level III: Severe disturbance segment (geomagnetic is prohibited from being used for heading update).
[0102] Accordingly, construct the quality label q k ∈{q (1) q (2) q (3) Furthermore, by employing time smoothing and hysteresis mechanisms to suppress frequent jumps in quality labels, the geomagnetic quality sequence becomes more suitable for continuous weight adjustment in subsequent heading fusion.
[0103] Step S103: Pace event detection based on time-frequency analysis and multi-channel consistency
[0104] This step is used to stably detect gait events under real-world conditions such as high noise levels, frequent gait changes, and dynamic changes in mobile terminal posture. The system adopts a three-layer detection structure of "step frequency estimation → step window prediction → fine gait localization," combined with multi-channel consistency constraints of acceleration and gyroscope signals, to achieve robust gait detection across scenarios.
[0105] (1) Construction of multi-channel gait signals.
[0106] In step S103, firstly, based on the attitude calculation results, the three-axis acceleration in the body coordinate system is...
[0107] a b [n] = [[a] x [n],a y [n],a z [n] T
[0108] Unit vector relative to the direction of gravity
[0109]
[0110] By performing a scalar projection, we can construct the acceleration in the direction of gravity:
[0111]
[0112] And further, the horizontal resultant acceleration modulus was obtained:
[0113]
[0114] In gait analysis, besides the gravitational acceleration a... g [n] and the horizontal resultant acceleration a h In addition to [n], this invention also introduces the vertical component of the gyroscope angular velocity as an auxiliary gait signal. Specifically, let the three-axis angular velocities in the body coordinate system be...
[0115] ω b [n]=[[ω x [n],ω y [n],ω z [n] T
[0116] Project it onto the unit vector of the direction of gravity The vertical angular velocity component is obtained from the above:
[0117]
[0118] This allows us to obtain the angular velocity component around the vertical direction. This component can maintain a stable correspondence with the gait rhythm under any posture, and serves as a robust gait event auxiliary signal across postures and gaits.
[0119] (2) Main step frequency estimation based on time-frequency analysis.
[0120] Within the sliding time window, for the main channel a g [n] Perform Short-Time Fourier Transform (STFT):
[0121]
[0122] In the typical step frequency range F step Find the main energy peak within [0.5, 3Hz]:
[0123]
[0124] The time-varying step frequency is obtained through exponential smoothing:
[0125]
[0126] The step period is estimated as follows:
[0127]
[0128] This step frequency sequence provides a priori temporal structure for subsequent real-time step localization.
[0129] (3) Construction of candidate step time window based on step frequency prediction.
[0130] Suppose the previous determined step event occurs at time t. The approximate center location for the next step is predicted to be:
[0131]
[0132] Constructing a candidate search window:
[0133]
[0134] The window size Δ is dynamically adjusted according to the step frequency, thus maintaining detection stability under non-steady-state conditions such as acceleration / deceleration, sudden stops, and going up / down stairs.
[0135] (4) Multi-channel consistency and precise step positioning within the step window.
[0136] The candidate step time window W provided by the predicted step frequency i+1 In addition, this invention utilizes both gravity alignment acceleration and gyroscope angular velocity information for joint determination to enhance the robustness of gait event detection.
[0137] First, search for local extrema in the main channel (usually the acceleration component in the direction of gravity):
[0138] In window W i+1 In the process, local extrema are found in the main channel:
[0139] C a ={n∈W i+1 ||a g [n]| represents local peaks / valleys}
[0140] Simultaneously extract key features of the angular velocity channel (such as extremely low or zero rotational speed):
[0141] C ω ={n∈W i+1 ||ω g [n]|<∈ ω}
[0142] Construct a cross-channel consistency set:
[0143] C = C a ∩C ω
[0144] In the consensus candidate set C, to select the most credible step event point, this invention constructs a joint scoring function:
[0145]
[0146] Where w a σ represents the weight of the "vertical acceleration channel" in gait detection. a,w To represent the standard deviation of acceleration (usually the gravitational directional component or the projected component) within the current sliding window W, μ a,w w is the mean value of the acceleration component within window W. ω The weights set for the gyroscope angular velocity channels, ω g [n] represents the projection component of the gyroscope angular velocity vector onto the instantaneous gravitational direction, σ ω,w The gyroscope's angular velocity is the standard deviation within the window W.
[0147] In addition, to suppress false triggering caused by noise, elevator vibration, and random mobile phone swinging, this invention further introduces the following multi-channel consistency constraints: (1) Vertical acceleration energy significance: The local peak value of the candidate point must significantly exceed the background noise level. (2) Horizontal / angular velocity synchronization: The horizontal acceleration or gyro angular velocity in the neighborhood must show matching peaks or direction reversal characteristics. (3) Cross-channel phase consistency: The peak position difference between acceleration and angular velocity must be less than a preset phase difference threshold.
[0148] The final step event is obtained through the following optimizations:
[0149]
[0150] This method organically combines "step frequency prediction constraint + multi-channel consistency + scoring optimization", which can maintain stable and continuous step-by-step triggering even under conditions of rapid attitude change, strong noise or random equipment jitter, and finally output a reliable step event sequence {ti} as an accurate time reference for subsequent step length estimation and trajectory recursion.
[0151] Step S104: Adaptive step size estimation based on residual feedback
[0152] This step addresses the step size shift problem caused by gait variations, speed fluctuations, and individual differences. Building upon the traditional feature-driven step size model, it introduces trajectory residual feedback composed of multi-source "soft observations" to achieve online adaptive convergence of step size parameters, thereby significantly suppressing long-term drift and enhancing cross-scene consistency. This step includes the following three core sub-modules:
[0153] (1) Initial step size prediction
[0154] After detecting the i-th step event, this invention first obtains an initial step size estimate based on the feature-driven model:
[0155]
[0156] Where g(·) is the nonlinear mapping or regression model trained based on sample data during the calibration phase, and A i f represents the peak value, energy, and variance of the gravitational acceleration in this step period. step,i Φ represents the step frequency corresponding to this step. i It is a statistical measure of the angular velocity modulus (such as mean, variance, or energy).
[0157] (2) Multi-source constraints constitute "soft observation"
[0158] To suppress long-term drift, a step-size adaptive update mechanism based on residual feedback is introduced: the system introduces multi-source constraints at a certain time scale to form the "observation" position, including but not limited to building structure geometric constraints (such as the main direction of the passage, floor leveling consistency, wall boundaries and traffic topology), external positioning constraints (such as intermittently available GNSS, Wi-Fi, Bluetooth, UWB or visible light positioning results), and indoor scene anchor points obtained through motion behavior recognition (such as elevators, escalators, stairs, entrances and exits). The predicted position is obtained by comparing the PDR recursive prediction. Position after constraint correction Construction trajectory residual and in the current walking direction u i The upper projection is the scalar step size residual ΔL i =r i ·u i This is used to adjust the step and related step size parameters online.
[0159] (3) Step size adaptive update
[0160] Based on this, the present invention uses the following formula to complete the adaptive correction of the i-th step size:
[0161]
[0162] Where, α i ∈[0,1] represents the update gain for this step, used to control the strength of the residual's effect on the step size correction. Update gain α i The following factors can be adaptively set: (1) ΔL i (1) Long-term variance and stability (to prevent overcorrection caused by a single abnormal observation); (2) Confidence of external constraints or observations (such as GNSS accuracy, Wi-Fi coverage quality, map matching consistency, etc.); (3) Stationarity and convergence of historical step size estimation.
[0163] Through the aforementioned residual projection and gain adjustment mechanism, the step size parameter can gradually converge along the time axis without relying on accurate mobile phone attitude estimation, combined with multi-source soft constraint information. This allows the model to maintain relatively stable consistency under different gait patterns, walking speeds, and individual differences, and significantly suppresses long-term cumulative errors in PDR. Meanwhile, the lateral deviation is handled independently by the subsequent heading estimation and geometric constraint modules, avoiding incorrect coupling between step size and heading, and ensuring the physical rationality and engineering feasibility of the overall system.
[0164] Step S105: Adaptive Fusion of Heading Angle Based on Geomagnetic Mass Driven
[0165] In the heading estimation stage, this invention adopts a collaborative strategy of "gyro integration providing short-term continuity and geomagnetic observation providing long-term reference" and dynamically adjusts the geomagnetic measurement weights based on the geomagnetic quality level obtained in step S102, so that the system can still maintain smooth, stable and non-jumping heading calculation results under strong disturbance, weak GNSS or multi-attitude carrying conditions.
[0166] (1) Short-time heading prediction based on gyro integral
[0167] At the k-th discrete time step, the heading is predicted using the horizontal angular velocity of the gyroscope:
[0168]
[0169] in To predict the heading, Δt is the sampling period.
[0170] When the device is detected to be at a low angular velocity or stationary, a Zero Angular Rate Update (ZARU) can be performed to suppress the short-term drift accumulation of the gyro integral and keep the predicted heading smooth and continuous.
[0171] (2) Construction of heading observation based on geomagnetic vector
[0172] After the original geomagnetic vector is calibrated with hard iron / soft iron and projected onto a reference coordinate system, the geomagnetic heading observation is calculated based on its horizontal projection direction:
[0173]
[0174] in This represents the corrected geomagnetic vector component in the horizontal plane.
[0175] When step S102 determines that the geomagnetic quality is "usable segment", It can serve as the main long-term constraint for heading integration; when it is determined to be a minor or severe disturbance, the measurement should be reduced or shielded to avoid sudden changes in heading caused by magnetic field distortion caused by rotating machinery, elevators, cable currents, etc.
[0176] (3) Adaptive weight adjustment based on geomagnetic quality level
[0177] This invention uses geomagnetic quality parameters as a basis to analyze the covariance of geomagnetic measurement noise. or fusion weight Dynamic adjustment:
[0178] For high-quality geomagnetic segments, increase reduce Enhance the real-time correction of gyroscope drift by magnetic navigation.
[0179] For suspicious geomagnetic segments, reduce Increase It is only used to suppress long-term drift and is not involved in fast correction.
[0180] For severely disturbed segments, let Or let By completely ignoring geomagnetic measurements, the system maintains course consistency solely through gyro integrals and environmental structural directional constraints (such as the main corridor direction). This mechanism enables real-time adaptive response to geomagnetic quality, effectively avoiding course jumps caused by magnetic field anomalies.
[0181] (4) Smooth transition and jump suppression mechanism
[0182] To avoid frequent switching of geomagnetic quality levels in the boundary region causing abrupt changes in heading weights, this invention introduces multiple smoothing suppression mechanisms during heading fusion: (1) Using a continuous mapping function (such as Sigmoid or Softplus) to smoothly map the disturbance index to the geomagnetic measurement weights, so that the weights change continuously with the disturbance intensity rather than jumping instantaneously; (2) Using measurement noise covariance scaling to replace the "direct elimination" strategy, so that the reliability of geomagnetic observations changes in a controllable and gradual manner during the transition from "usable" to "unusable"; (3) Using time hysteresis and short-term smoothing (Hysteresis+Moving Average) mechanisms to suppress label jitter caused by short-term disturbances or local noise, ensuring that the weight changes have temporal consistency.
[0183] The aforementioned smooth design ensures that the heading sequence remains continuous, stable, and without abrupt changes in the geomagnetic environment, sensor noise, or local electromagnetic interference, significantly improving the system's availability in complex environments.
[0184] (5) Heading fusion and optimization under the unified state estimation framework
[0185] Regardless of whether extended Kalman filter (EKF), complementary filter, unscented Kalman filter (UKF), or factor graph optimization (FGO) is used, this invention predicts the heading ψ using a gyroscope. k With geomagnetic observation heading Weighted fusion is performed under a unified state estimation framework. The geomagnetic measurement weights are dynamically controlled by the aforementioned quality level and disturbance index, ensuring that the fusion process simultaneously meets the following objectives: (1) Short-term continuity: Gyro integrals provide smooth transition and directional continuity over short timescales. (2) Long-term stability: High-quality geomagnetic measurements provide long-term heading references and suppress drift in environments without or with weak GNSS. (3) Environmental consistency: Combining structural geometric constraints such as corridor centerline and main corridor direction further enhances heading stability. (4) Disturbance resistance: High noise covariance or complete elimination strategies are adopted for geomagnetic disturbance segments to ensure that observations do not lead to heading jumps or anomalous deviations.
[0186] The aforementioned mechanism enables the heading sequence to maintain low drift, high smoothness, and directional consistency over a long period of time under strong disturbances, weak positioning, or multi-attitude carrying scenarios, providing key support for the overall PDR performance.
[0187] Step S106: State estimation and step-level trajectory output
[0188] Upon each step event, the present invention updates the pedestrian's position in the planar coordinate system based on the step length estimate obtained in step S104 and the heading increment obtained in step S105, forming a step-by-step recursive trajectory point sequence to achieve real-time relative positioning output of PDR. This trajectory can run independently without an external positioning source and has continuous and low drift characteristics.
[0189] When external positioning measurements such as GNSS, Wi-Fi, Bluetooth, UWB, or visible light are available, the PDR recursive trajectory can be used as a priori constraint in backend frameworks such as EKF, UKF, or factor graph optimization, and jointly optimized with external measurements to further improve the smoothness, global consistency, and long-term stability of the trajectory.
[0190] Through the closed-loop structure of steps S101–S106, this invention realizes a robust end-to-end PDR solution process, from multi-sensor preprocessing, geomagnetic disturbance determination, gait event recognition, adaptive step size update to heading angle fusion and trajectory output. Geomagnetic quality assessment is explicitly applied in heading fusion, and step size residual feedback runs through the estimation process, thereby achieving cross-module suppression of anomalous observations, continuous convergence of accumulated errors, and robust adaptation across gait and attitude in complex scenarios.
[0191] Example 2: Robust Pedestrian Dead Estimation Device
[0192] Based on the same inventive concept as Embodiment 1, this embodiment provides a robust pedestrian dead reckoning device that can be deployed on smartphones, smartwatches, wearable terminals, and other mobile devices with inertial and geomagnetic sensing capabilities. It is used to implement the aforementioned PDR method based on geomagnetic adaptation and time-frequency gait fusion. This device consists of multiple functional modules, which work collaboratively through software calls or hardware interfaces to form a complete closed-loop processing flow of "preprocessing—disturbance detection—gait recognition—gait length update—heading fusion—trajectory output". The device may include, but is not limited to, the following functional modules:
[0193] (1) Multi-sensor data acquisition and preprocessing module 210
[0194] It is used to collect and process wireless positioning data from a three-axis accelerometer, a three-axis gyroscope, a three-axis magnetometer, and optionally a barometer, Wi-Fi, Bluetooth, UWB, etc.
[0195] This module performs the following tasks: (1) Time synchronization and resampling to construct a unified discrete time series; (2) Coordinate system one to transform various observations to a unified reference coordinate system; (3) Filtering and noise reduction and anomaly removal, including low-pass / median filtering and statistical outlier detection; (4) Attitude calculation to estimate attitude quaternions or direction cosine matrices based on complementary filtering, Madgwick / Mahony filtering or quaternion EKF; (5) Output: acceleration, angular velocity, geomagnetic vector and attitude information in the reference coordinate system.
[0196] This module provides unified, high-quality data input for subsequent geomagnetic disturbance determination, gait recognition, and state deduction.
[0197] (2) Geomagnetic Disturbance Judgment and Quality Classification Module 220
[0198] This corresponds to step S102 in Example 1. This module extracts various "modulus-direction-frequency domain" features within a sliding time window to detect magnetic field anomalies in scenarios such as elevators, machine rooms, and high-voltage cables. The main functions include: (1) Modulus fluctuation feature extraction: calculating magnetic field strength shift, rate of change, and statistics; (2) Directional consistency detection: identifying abrupt changes in direction based on changes in the geomagnetic vector angle; (3) Frequency domain energy analysis (STFT): identifying periodic disturbances caused by rotating machinery, etc.; (4) Reference model deviation calculation: quantifying the degree of distortion due to deviation from the local reference magnetic field; (5) Disturbance index construction and quality classification: dividing the geomagnetic segment into Level I (high quality) / Level II (suspicious) / Level III (severe disturbance); (6) Output: geomagnetic quality label sequence and corresponding weight factors, used for weight adjustment in heading fusion.
[0199] (3) Time-frequency step detection and gait segmentation module 230
[0200] This corresponds to step S103 in Embodiment 1. This module is based on time-frequency analysis and multi-channel consistency constraints of acceleration and gyroscope to achieve robust step detection for different time states and carrying attitudes. The main functions include: (1) Main step frequency estimation: finding the main energy peak in the frequency domain to obtain a robust step frequency; (2) Step window prediction: constructing a candidate search window for the next step based on the step frequency; (3) Multi-channel consistency detection: using gravity direction acceleration, horizontal acceleration and vertical angular velocity in combination; (4) Scoring optimization and accurate step positioning: using cross-channel consistency scoring function to determine the most reliable step point; (5) Output: continuous and stable step event sequence.
[0201] This module avoids missed detections or false steps caused by relying on a single channel and remains stable even when the phone's orientation changes.
[0202] (4) Step size adaptive estimation module based on residual feedback 240
[0203] This corresponds to step S104 in Implementation Example 1. This module adopts a complete closed-loop strategy of "initial step size model - multi-source soft observation - trajectory residual projection - adaptive gain update", which realizes individualization of step size and cross-scene adaptive convergence by integrating multiple scene features. The system first generates an initial step size estimate for each step based on the regression model obtained by calibration, which is based on inputs such as step frequency, peak gravity acceleration, and angular velocity features. Then, it constructs the "soft observation" position by combining the geometric constraints of the building structure (such as the main direction of the corridor, floor consistency, and wall boundaries), external positioning measurements (such as GNSS, Wi-Fi, Bluetooth, UWB, or visible light positioning), and indoor anchor points obtained by motion behavior recognition (such as elevators, stairs, escalators, entrances, etc.), and forms the trajectory residual with the predicted position obtained by PDR recursion. To avoid coupling with the heading, the residual is only taken in the current walking direction u. i scalar projection ΔL on i =r i ·u i As the step size offset, the system adaptively adjusts the update gain based on the stability of the residual amplitude, the confidence level of the soft observation source, and the convergence of historical step size estimates, thereby completing the online correction of the current step size.
[0204] Through the aforementioned residual feedback mechanism, the step size parameter can achieve continuous and gradual individualized convergence under different time states, different carrying postures, and different environmental conditions, effectively suppressing long-term cumulative drift and improving the overall cross-scenario consistency and stability of PDR.
[0205] (5) Heading Angle Adaptive Fusion and Weight Adjustment Module 250
[0206] This corresponds to step S105 in Embodiment 1. This module, centered on "gyro integrals providing short-term continuity, geomagnetic observations providing long-term absolute reference, and geomagnetic quality labels driving dynamic weight adjustment," achieves stable heading fusion across scenarios. The system first uses gyroscope angular velocity to complete short-term heading prediction, and suppresses short-term drift through Zero Angular Velocity Update (ZARU) when low angular velocity or a stationary state is detected. Based on this, a horizontal projection direction is constructed from the calibrated geomagnetic vector and used as the heading observation. Subsequently, the fusion weight of geomagnetic observations is adaptively adjusted according to the geomagnetic quality level: in high-quality segments, the correction effect of geomagnetic observations on gyro drift is strengthened; in questionable segments, the contribution of geomagnetic observations is attenuated and used only for slow correction; in severely disturbed segments, geomagnetic observations are directly shielded, and heading consistency is maintained by combining structural geometric constraints such as the main corridor direction and stairwell axis.
[0207] To avoid heading jumps caused by weight switching, this module further employs continuous mapping functions such as Sigmoid / Softplus to achieve smooth weight changes. Measurement noise covariance scaling replaces hard switching, and hysteresis and short-term smoothing mechanisms are combined to suppress quality label jitter caused by instantaneous noise, ensuring the heading sequence remains continuous and controllable within the disturbance transition range. The final output heading sequence maintains high smoothness, long-term stability, and directional consistency even under conditions of strong magnetic disturbances, weak GNSS, or frequent changes in terminal attitude, providing crucial directional constraints for the entire PDR system.
[0208] (6) State estimation and stride-level trajectory output module 260
[0209] This corresponds to step S106 in Embodiment 1. Using step events as the time reference, this module, upon each step trigger, recursively calculates the pedestrian's step-by-step trajectory in a unified planar coordinate system based on the current step length estimate and heading increment, forming a continuous, smooth, and physically consistent step-level trajectory sequence. Simultaneously, this module supports joint fusion with external positioning measurements, building geometric constraints, or indoor semantic anchors within EKF, UKF, or Factor Graph Optimization (FGO) frameworks, enabling the trajectory to achieve higher global consistency and anti-drift capability in weak GNSS, strong disturbance, or complex indoor environments. The final output trajectory can be directly used in navigation, behavior recognition, motion analysis, positioning services, and other business scenarios.
[0210] This module can be deployed in software form within an app, SDK, or system service on a smartphone, smartwatch, or wearable terminal. It can also be partially or entirely implemented using hardware circuits such as embedded processing units, DSPs, and FPGAs, or flexibly allocated according to terminal resources using a hybrid software and hardware approach. As long as its functional flow is consistent with the core technical concept of this invention, it is considered to fall within the protection scope of this invention.
[0211] Example 3: Electronic Equipment
[0212] This embodiment provides an electronic device for executing the robust pedestrian dead reckoning (PDR) method described in any of the foregoing embodiments. The device can be a smartphone, smartwatch, wearable terminal, or other mobile device with inertial and geomagnetic sensing capabilities.
[0213] The electronic device includes at least one processor, a memory, and sensor / communication interfaces. The processor 1010 is used to run program instructions stored in the memory and sequentially execute method steps S101–S106, including: multi-sensor data preprocessing, adaptive determination of geomagnetic disturbance, gait event detection based on time-frequency analysis, adaptive step size update based on residual feedback, adaptive fusion of heading angle based on geomagnetic quality, and recursive output of gait-level trajectory.
[0214] The memory 1020 is used to store the operating system, application programs, and program code, parameter configurations, and intermediate state data required to implement the method of the present invention. The device can acquire data from sensors 1030 such as accelerometers, gyroscopes, magnetometers, and optional barometers through the input / output interface 1040; and receive external auxiliary information, such as floor structure, indoor maps, or reference geomagnetic models, through the communication interface 1050 (such as Wi-Fi, Bluetooth, or cellular network).
[0215] When the processor executes the above program instructions, the electronic device can perform real-time dead reckoning of pedestrian movement according to the method of the present invention, generating a continuous, smooth, and low-drift step-level trajectory. This embodiment demonstrates the deployability and engineering feasibility of the present invention in general-purpose mobile terminals.
[0216] Example 4: Non-transitory computer-readable storage medium and computer program product
[0217] This embodiment provides a non-transitory computer-readable storage medium storing computer program instructions. When executed by a processor, the program instructions cause an electronic device to perform the robust pedestrian dead reckoning method of any of the foregoing embodiments, including all or part of steps S101–S106.
[0218] The non-transitory storage medium can be any medium with storage capabilities, such as Flash, ROM, EEPROM, solid-state drive, or mobile storage card. The program can be executed on a local terminal or loaded over a network and run on the terminal side. During program execution, several logical modules can be formed to complete processing functions such as geomagnetic disturbance detection, time-frequency step detection, step size adaptive estimation, heading fusion, and trajectory output.
[0219] Any program that enables the processor to execute the technical steps of the method of this invention is considered to fall within the protection scope of this invention. This embodiment does not limit the programming language, compilation method, or execution carrier.
Claims
1. A robust pedestrian dead reckoning method based on geomagnetic adaptive and time-frequency pacing fusion, characterized in that, include: Preprocessing and attitude calculation are performed on data from inertial sensors and geomagnetic sensors to construct a unified reference coordinate system; Based on geomagnetic modulus fluctuations, directional consistency, and frequency domain energy characteristics, adaptive judgment and quality classification of geomagnetic disturbances are performed. Based on short time-frequency domain analysis, time-frequency energy features are extracted from acceleration and angular velocity signals to achieve robust step event detection; Based on the residual feedback mechanism, multi-source constraint information is fused to perform online adaptive correction of step size estimation; Based on the geomagnetic quality level, the weight of magnetometer observations in the heading angle fusion is dynamically adjusted to achieve robust heading estimation; Based on the step length and heading, step-level trajectory recursion and output are performed.
2. The method according to claim 1, characterized in that, The adaptive determination and quality classification of geomagnetic disturbances includes: Within a sliding time window, the magnitude fluctuation, direction change rate, and frequency domain energy distribution of the geomagnetic vector are calculated. The aforementioned features are integrated to construct a geomagnetic disturbance index, and geomagnetic quality is classified into usable, questionable, and unusable levels based on multi-level thresholds; Frequent jumps in quality labels are suppressed through time smoothing and hysteresis mechanisms.
3. The method according to claim 1, characterized in that, The implementation of robust step event detection includes: In the navigation coordinate system, the acceleration in the direction of gravity, the magnitude of the horizontal resultant acceleration, and the angular velocity around the direction of gravity are extracted to form a multi-channel gait signal. Perform a short-time Fourier transform on the main channel signal to track the main energy peak within the expected step frequency band in order to estimate the time-varying step frequency; Based on the time-varying step frequency, candidate step time windows are predicted, and fine step localization is performed within the window using multi-channel consistency constraints and joint scoring functions.
4. The method according to claim 1, characterized in that, The online adaptive correction of the step size estimation based on the residual feedback mechanism includes: Preliminary estimates are obtained based on step frequency, peak acceleration, and angular velocity characteristics using an initial step size model. Trajectory residuals are generated by comparing the PDR predicted location with the observed location from environmental structural constraints or external positioning. The trajectory residual is projected onto the current walking direction as a step size residual, and the initial step size estimate is corrected with an adaptive gain.
5. The method according to claim 1, characterized in that, The robust estimation of the heading includes: Short-term heading prediction is performed using gyroscope angular velocity, and zero angular velocity updates are used to suppress drift. Based on the geomagnetic quality level, the fusion weight or measurement noise covariance of the magnetometer heading observations is dynamically adjusted through a continuous mapping function; When there is severe geomagnetic disturbance, the heading consistency is maintained by combining the geometric constraints of the main direction of the corridor or the axis of the stairwell.
6. A robust pedestrian dead reckoning device based on geomagnetic adaptive and time-frequency pacing fusion, characterized in that, include: A multi-sensor data acquisition and preprocessing module is used for data synchronization, filtering, and attitude calculation. The geomagnetic disturbance determination and quality grading module is used to achieve adaptive assessment of geomagnetic quality. A time-frequency gait detection and gait segmentation module is used to robustly identify gait events; A residual feedback-based adaptive step size estimation module is used to correct the step size parameters online. The heading angle adaptive fusion and weight adjustment module is used to achieve robust heading calculation; The state estimation and step-level trajectory output module is used to generate continuous trajectories.
7. The apparatus according to claim 6, characterized in that, The multi-sensor data acquisition and preprocessing module is further used for: Time synchronization, coordinate system unification, and outlier removal are performed on the data from the triaxial accelerometer, triaxial gyroscope, and triaxial magnetometer. Attitude tracking is performed using complementary filtering or quaternion extended Kalman filtering, and acceleration is decomposed into gravity and motion components.
8. The apparatus according to claim 6, characterized in that, The step-size adaptive estimation module based on residual feedback is further used for: Receive soft observation information from environmental structural geometric constraints, external positioning measurements, or indoor behavior recognition anchor points; The residual between the predicted location and the soft observation location is calculated and projected onto the walking direction to drive the online update of the step size parameter.
9. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any one of claims 1 to 5.
10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform the method described in any one of claims 1 to 5.
Citation Information
Cited By
Multi-modal traffic participant motion prediction system
CN121959456A