A pedestrian inertial positioning method and device based on an adaptive sliding window and a space-time network model
By using an adaptive sliding window and a spatiotemporal network model, pedestrian motion data is dynamically segmented and features are extracted, solving the problems of error accumulation and pattern recognition difficulties in traditional IMU systems, and achieving higher accuracy and more stable pedestrian inertial navigation.
Patent Information
- Application Number
- CN202410079027.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2044-01-19
AI Technical Summary
Traditional IMU systems suffer from severe error accumulation over long periods of operation and struggle to effectively identify complex pedestrian movement patterns, leading to a decline in navigation performance, especially in environments with limited GPS signals.
An adaptive sliding window and spatiotemporal network model are adopted. Pedestrian motion data is dynamically segmented by the adaptive sliding window technique, features are extracted by combining spatiotemporal variance attention network, and the model is trained using real location coordinates to predict pedestrian walking trajectories.
It significantly improves the accuracy and stability of pedestrian inertial navigation systems, reduces error accumulation, better adapts to the complex movement patterns of pedestrians, and enhances navigation accuracy.
Smart Images

Figure CN120351925B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of inertial navigation systems, and is particularly directed to the application of inertial measurement units (IMU) in indoor pedestrian navigation. BACKGROUND
[0002] Traditional pedestrian inertial navigation systems mainly rely on inertial measurement units (IMU), which are integrated electronic devices used to measure and report specific physical motion data of a system, including acceleration, angular velocity, and sometimes the direction of the magnetic field around. These systems provide relative position and direction information without the need for external references, making them extremely important in environments where wireless or GPS signals are limited. However, traditional IMU systems have some inherent defects. First, they are usually affected by error accumulation, especially when running for a long time. This is because the positioning information of the IMU system is obtained by integrating acceleration and angular velocity measurements, and these measurements themselves may contain noise and bias. Therefore, over time, these small errors accumulate, leading to increasingly large position errors. Second, the motion patterns of pedestrians are complex and varied, making it more difficult to use traditional IMU systems for accurate navigation. The motion characteristics of pedestrians, such as walking, turning, stopping, and starting, require the system to quickly and accurately recognize and adapt to these changes. However, traditional systems often fail to effectively distinguish between these different motion patterns, thereby affecting the overall navigation performance. In order to solve these problems, various attempts have emerged in recent years, including the use of complex filtering algorithms, the combination of external sensor data (such as GPS or vision systems). These methods have improved the performance of traditional IMU systems to some extent, but still have limitations, especially in indoor or other GPS signal-limited environments. SUMMARY
[0003] The purpose of the embodiments of the present application is to provide a pedestrian inertial positioning method and device to increase the accuracy and stability of the inertial positioning system. The specific technical solutions are as follows:
[0004] In a first aspect, the embodiments of the present application provide a pedestrian inertial positioning method based on adaptive sliding window and spatio-temporal network model, the method comprising:
[0005] Collecting pedestrian IMU motion data, including acceleration and angular velocity information, and preprocessing the data, including denoising, standardization, and coordinate system rotation;
[0006] Using adaptive sliding window corner detection technology, dynamically segmenting pedestrian motion IMU data into straight and corner modules;
[0007] Using spatio-temporal variance attention network to extract time and space features in different state motion segments, and fusing the two features;
[0008] The ability of pedestrian positioning is realized by training a model with real position coordinate information to predict the regression relationship between input features and position information and determining the pedestrian walking trajectory based on the relationship.
[0009] In the first embodiment of the present application, the IMU motion data of the collected pedestrians includes acceleration and angular velocity information, and the data is preprocessed, including denoising, standardization and coordinate system rotation, including:
[0010] IMU data of pedestrian walking is obtained by a sensor device, and an IMU data model is constructed. The 3D angular velocity (ω) and 3D acceleration (α) provided by the IMU are affected by bias and noise based on certain characteristics of the sensor, as follows:
[0011]
[0012]
[0013] wherein, and are the true values measured by the gyroscope and the accelerometer at time stamp t, and are time-varying biases, and are noise values, which usually follow a zero-mean Gaussian distribution. Then, coordinate system transformation is implemented to eliminate device differences. The direction of the subject at time t The direction Ω(t) between two discrete time points t and t-1 can be updated according to the following formula, where ω(t-1) is the angular velocity of the subject at time (t-1) in the body coordinate system (Body frame) relative to the navigation coordinate system (Navigation frame).
[0014]
[0015]
[0016] The measured value x ∈ [ω, α] can be used to rotate from the body coordinate system to the navigation coordinate system, which is represented by wherein, represents the Hamilton product between two quaternions.
[0017] In the first embodiment of the present application, the IMU data of the collected pedestrians includes acceleration and angular velocity information, and the data is preprocessed, including denoising, standardization and coordinate system rotation, including:
[0018] Sliding window technique is used to continuously analyze the inertial measurement unit (IMU) data stream, and the window size is automatically adjusted to adapt to the changes in pedestrian walking speed and the dynamic characteristics of turning corners. Multiple overlapping windows are used, each covering 200 data points and moving at a fixed step to ensure the integrity and continuity of the time series. The data in each window is processed and input into a Transformer-based classifier, which determines whether the data points in the window belong to a straight or turning state. The output of the classifier is aggregated through a voting system to improve the robustness of the decision. If the data points in multiple overlapping windows are classified as the same state, that state is considered the final decision. This voting mechanism can effectively reduce the classification errors that individual windows may produce. In addition, the network includes a continuity detection mechanism to smooth the classification results near the transition points. This mechanism sets a threshold to determine whether the classification result needs to be adjusted to ensure that the transition between straight and turning states is coherent. Without sacrificing temporal information, the turning points in the pedestrian trajectory are accurately identified and labeled, providing accurate state classification for subsequent spatio-temporal variance attention networks, enhancing the model's generalization ability in handling different walking patterns and complex paths.
[0019] In the first embodiment of the present application, the use of spatio-temporal variance attention network to extract time and space features in different state motion segments and fuse the two features includes:
[0020] First, for each slice, calculate the overall variance according to the following formula:
[0021]
[0022] Where μ represents the mean of the time steps within each slice, σ 2 is the calculated variance, which not only serves as a statistical measure of data volatility within the slice, but also provides key information about motion changes within the slice. This variance is then converted to a variance embedding V embed through a fully connected embedding layer f e .
[0023] Meanwhile, the IMU data is processed through a one-dimensional convolutional neural network with normalization and linear layers to learn a spatial representation, achieving spatial embedding and capturing spatial correlations between different sensor signals, resulting in spatial features S e . The time embedding uses a one-layer bidirectional LSTM model to extract time information, and then adds position encoding provided by a trainable neural network. These embedded features provide rich context information for the model, helping to more accurately estimate the speed of pedestrians.
[0024] The encoder employs variance-aware self-attention mechanism to encode the features of the embedding layer output. The spatial feature S e with the variance embedding V e are inputted into the encoder, in this layer the variance embedding is mainly used to adjust the attention weight, to strengthen the model's attention to the time steps with higher variability, which is realized by variance-aware self-attention calculation, as follows:
[0025]
[0026] where W Q , W K , W V are the query, key, and value transformation weight matrices respectively, W var is the variance weight matrix, d k is the dimension of the key, and A var is the final variance-adjusted attention score. The encoder is stacked by multiple self-attention layers, each of which includes a residual connection and layer normalization to ensure the effectiveness and stability of deep learning.
[0027] The decoder also includes a stack of multiple identical layers. In each layer, a masked self-attention sublayer is used to extract the dependencies in the temporal dimension. The mask emphasizes that the output at time stamp t can only rely on the IMU samples before time stamp t. Next, the output of the encoder stack is passed through a multi-head attention sublayer to fuse the spatial, variance, and temporal information into a single vector representation, and then through a fully connected feedforward sublayer.
[0028] In the first embodiment of the present application, the ability to realize pedestrian positioning by predicting the regression relationship between the input features and the position information using the real position coordinate information to train the model and determining the pedestrian walking trajectory based on the relationship comprises:
[0029] The pedestrian IMU time series and its real position coordinates are jointly inputted into the positioning model of the present application, the pre-trained model updates and adjusts the model parameters, after obtaining the above pre-trained model, the pedestrian IMU data in other scenarios is inputted to obtain the ability to realize pedestrian positioning by pedestrian walking trajectory.
[0030] In the second aspect, the embodiments of the present application provide a pedestrian inertial positioning device based on an adaptive sliding window and a space-time network model, the device comprises:
[0031] A data collection and preprocessing module: collects the IMU motion data of pedestrians, including acceleration and angular velocity information, and pre-processes the data, including denoising, standardization, and coordinate system rotation;
[0032] A sliding window corner detection module: uses adaptive sliding window corner detection technology to dynamically segment the pedestrian motion IMU data into straight and corner modules.
[0033] The spatio-temporal variance feature fusion module extracts time and space features in different state motion segments by using a spatio-temporal variance attention network, and fuses the two features.
[0034] The position prediction module trains a model to predict the regression relationship between input features and position information, and determines the walking trajectory of the pedestrian based on the relationship to realize the positioning ability of the pedestrian.
[0035] In an embodiment of the present application, the data collection and preprocessing module is specifically used for:
[0036] IMU data of pedestrian walking is obtained through a sensor device, an IMU data model is constructed, coordinate system transformation is realized, and device differences are eliminated.
[0037] In an embodiment of the present application, the sliding window corner detection module is specifically used for:
[0038] A classifier based on a Transformer-base is used to classify the preprocessed pedestrian data, and a voting mechanism and continuity detection are used to continuously analyze the IMU data stream and automatically adjust the window size. Finally, the classified pedestrian motion segments are obtained.
[0039] In an embodiment of the present application, the spatio-temporal variance feature fusion module is specifically used for:
[0040] The spatio-temporal variance attention network uses spatial features and variance embedding to jointly input an encoder, adjusts attention weights through variance-aware self-attention calculation, and fuses space, variance and time information into a single vector representation through a multi-head attention sublayer of the encoder.
[0041] In an embodiment of the present application, the position prediction module is specifically used for:
[0042] The pedestrian IMU time series and its real position coordinates are jointly input into the positioning model of the present application, the pre-trained model updates and adjusts the model parameters, and after obtaining the above pre-trained model, the pedestrian IMU data in other scenes is input to obtain the walking trajectory of the pedestrian to realize the positioning ability of the pedestrian.
[0043] The embodiment of the present application has the following beneficial effects:
[0044] The present application provides a pedestrian inertial positioning method and device based on an adaptive sliding window and a spatio-temporal network model, which overcomes the limitations of traditional IMU systems by combining innovative adaptive sliding window technology and spatio-temporal networks, and significantly improves the accuracy and stability of the pedestrian navigation system. BRIEF DESCRIPTION OF DRAWINGS
[0045] The drawings of the present patent provide detailed views of the inertial positioning system, which are intended to assist the text of the description in order to more intuitively present the individual components of the invention and their mutual relationships. The drawings show the overall architecture of the system, the working principle of the key components, and the specific implementation of the data processing flow. The elements in the drawings are not representative of the actual quantity ratio or precise layout, but rather focus on clarifying the concept and operation process of the invention.
[0046] Figure 1 A flowchart of a pedestrian inertial positioning method based on an adaptive sliding window and a spatio-temporal network model is provided for the embodiments of the present invention.
[0047] Figure 2 An adaptive sliding window corner detection network diagram is provided for the embodiments of the present invention.
[0048] Figure 3 A spatio-temporal variance attention network diagram is provided for the embodiments of the present invention.
[0049] Figure 4 A flowchart of a pedestrian inertial positioning device based on an adaptive sliding window and a spatio-temporal network model is provided for the embodiments of the present invention. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present invention will be described in detail below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art based on the present invention belong to the scope of protection of the present invention.
[0051] Traditional inertial measurement unit (IMU) systems have inherent defects, mainly including error accumulation and difficulty in recognizing pedestrian motion patterns. These systems determine position by integrating acceleration and angular velocity measurements, but these measurements can contain noise and bias, leading to gradual accumulation of errors over time, especially when running for a long time. In addition, the motion characteristics of pedestrians are diverse (such as walking, turning, stopping, and starting), and traditional IMU systems often cannot effectively distinguish these different motion patterns, affecting navigation performance. To improve performance, complex filtering algorithms and methods combining external sensor data (such as GPS or vision systems) are used, which to some extent alleviate the problem. However, these solutions still have limitations in indoor or GPS signal limited environments.
[0052] To solve the above problems, the embodiments of the present invention provide a pedestrian inertial positioning method and device based on an adaptive sliding window and a spatio-temporal network model, which will be described in detail below.
[0053] Firstly, the pedestrian inertial positioning method based on adaptive sliding window and space-time network model provided by the embodiment of the application is described.
[0054] Referring to Figure 1 A flowchart of the pedestrian inertial positioning method based on adaptive sliding window and space-time network model provided by the embodiment of the application is shown, the method is applied to an electronic device with computing capability, for example, the method is applied to a computer, and the method includes the following steps S101 to S104.
[0055] The application relates to a method for pedestrian inertial navigation, aiming to provide a navigation data generation model based on adaptive sliding window and space-time network. The following embodiment provides a specific application mode of the application, so as to facilitate the understanding and implementation of the application by the skilled in the art. The specific embodiment of the application is described in detail as follows:
[0056] Step S101: collect the IMU motion data of the pedestrian, including acceleration and angular velocity information, and pre-process the data, including denoising, standardization and coordinate system rotation.
[0057] Specifically, IMU data of pedestrian walking is acquired through a sensor device, and an IMU data model is constructed. The 3D angular velocity (omega) and 3D acceleration (alpha) provided by the IMU are affected by bias and noise based on the characteristics of the sensor, as follows:
[0058]
[0059]
[0060] wherein, and are the true values measured by the gyroscope and the accelerometer at the time stamp t, and are time-varying biases, and are noise values, which usually obey zero-mean Gaussian distribution. Then, coordinate system transformation is realized to eliminate device differences. The direction of the subject at time t The direction Omega(t) between two discrete time points t and t-1 can be updated according to the following formula, wherein omega(t-1) is the angular velocity of the subject in the body coordinate system (Body frame) relative to the navigation coordinate system (Navigation frame) at time (t-1).
[0061]
[0062]
[0063] The measurement value x e [ω, α] can be used to rotate from the body coordinate system to the navigation coordinate system, denoted by wherein, represents the Hamilton product between two quaternions.
[0064] Exemplarily, first, the motion data of pedestrians are collected using an inertial measurement unit (IMU), including acceleration and angular velocity information. To ensure data quality, the collected data need to be preprocessed, including denoising and standardization. In addition, the motion state of pedestrians (such as straight or turning) needs to be accurately labeled. In order to further improve the accuracy and efficiency of data processing, the collected data will be cut into segments of 200 data points, and sliding with a step of 10 data points, to ensure the continuity and integrity of the data.
[0065] Step S102: using adaptive sliding window corner detection technology, the pedestrian motion IMU data is dynamically segmented into straight and corner cutting pieces.
[0066] Specifically, the preprocessed pedestrian data is classified using a Transformer-base classifier, and a voting mechanism is used to continuously analyze the IMU data stream and automatically adjust the window size. Finally, the classified pedestrian motion segments are obtained.
[0067] Exemplarily, see Figure 2 The preprocessed data segments (size 200, step 10) are input into the Transformer-based classifier. This step aims to use the strong learning ability of Transformer to effectively classify each data segment and distinguish the motion state of pedestrians (straight or turning). The classified data segments will then undergo a voting mechanism to improve the accuracy and robustness of the classification. In this phase, the system will consider the classification results of multiple adjacent data segments and determine the final state classification through majority voting. The system further implements continuity detection to ensure that the classification results between data segments have logical continuity and consistency. This step is achieved by analyzing the classification results of adjacent data segments and adjusting the classification if necessary to reduce misclassification and improve the robustness of the overall system. Throughout the process, the sliding window technique is used to continuously process the data stream, ensuring that the generation and classification of data segments can dynamically adapt to the changes in the motion of pedestrians.
[0068] Step S103: using a spatiotemporal variance attention network to extract time and spatial features in different state motion segments, and fusing the two features.
[0069] Specifically, the space-time variance attention network utilizes the space feature and the variance embedding to jointly input an encoder, adjusts the attention weight through variance-aware self-attention calculation, and fuses the space, variance and time information into a single vector representation through a multi-head attention sublayer.
[0070] For example, referring to Figure 3 The network utilizes a space encoder and a self-attention mechanism to extract space features, uses an LSTM and position encoding to strengthen time series analysis, and dynamically processes data uncertainty by taking variance as an input feature. The encoder of the network utilizes a variance-aware self-attention mechanism to encode the features output by the embedding layer, wherein the space feature and the variance embedding are simultaneously input into the encoder, and the variance embedding is mainly used to adjust the attention weight and enhance the attention of the model to time steps with higher variability.
[0071] Step S104: The model is trained by using the real position coordinate information to predict the regression relationship between the input features and the position information, and the ability of the pedestrian to locate the walking trajectory is determined based on the relationship.
[0072] Specifically, the IMU time series of the pedestrian and the real position coordinates thereof are jointly input into the positioning model of the application, the pre-trained model updates and adjusts the model parameters, and after the above pre-trained model is obtained, the IMU data of the pedestrian in other scenes is input to obtain the ability of the pedestrian to locate the walking trajectory.
[0073] Corresponding to the aforementioned pedestrian inertial positioning method based on the adaptive sliding window and the space-time network model, the embodiment of the application further provides a pedestrian inertial positioning device based on the adaptive sliding window and the space-time network model.
[0074] For example, Figure 4 The embodiment of the application provides a flowchart of a pedestrian inertial positioning device based on an adaptive sliding window and a space-time network model, and the device is applied to an electronic device with computing capability, and the device comprises:
[0075] A data collection and preprocessing module 401 is configured to collect IMU motion data of a pedestrian, including acceleration and angular velocity information, and to preprocess the data, including denoising, standardization and coordinate system rotation.
[0076] A sliding window corner detection network module 402 is configured to utilize an adaptive sliding window corner detection technology to dynamically segment the IMU data of the pedestrian motion into straight and corner motion segments.
[0077] A space-time variance feature fusion module 403 is configured to utilize a space-time variance attention network to extract time and space features in different state motion segments, and to fuse the two features.
[0078] The position prediction module 404 uses real position coordinate information to train a model to predict the regression relationship between input features and position information and determines the walking track of the pedestrian to realize the ability of pedestrian positioning.
[0079] In an embodiment of the present application, the data collection and preprocessing module 401 is specifically used for:
[0080] IMU data of pedestrian walking is obtained by a sensor device, an IMU data model is constructed, coordinate system transformation is realized, and device differences are eliminated.
[0081] In an embodiment of the present application, the sliding window corner detection network module 402 is specifically used for:
[0082] A classifier of a Transformer-base is used to classify the preprocessed pedestrian data, a voting mechanism and continuity detection are used to continuously analyze the IMU data stream, and the window size is automatically adjusted. Finally, the classified pedestrian motion segments are obtained.
[0083] In an embodiment of the present application, the spatiotemporal variance feature fusion module 403 is specifically used for:
[0084] The spatiotemporal variance attention network uses spatial features and variance embedding to jointly input an encoder, adjusts attention weights through variance perception self-attention calculation, and encodes the output of the encoder through a multi-head attention sublayer to fuse spatial, variance and time information into a single vector representation.
[0085] In an embodiment of the present application, the position prediction module 404 is specifically used for:
[0086] The pedestrian IMU time sequence and its real position coordinates are jointly input into the positioning model of the present application, a pre-trained model updates and adjusts model parameters, after the pre-trained model is obtained, pedestrian IMU data in other scenes is input, and the walking track of the pedestrian is realized to achieve the ability of pedestrian positioning.
Claims
1. A pedestrian inertial positioning method based on adaptive sliding window and space-time network model, characterized in that The method comprises the following steps: IMU motion data of pedestrians, including acceleration and angular velocity information, are collected and preprocessed, including denoising, standardization and coordinate system rotation; IMU data model is constructed by obtaining IMU data of pedestrian walking through a sensor device, wherein the 3D angular velocity ω t and 3D acceleration α t provided by the IMU will be affected by bias and noise based on certain characteristics of the sensor, and the following relationship is satisfied: where, and are the true values measured by the gyroscope and accelerometer respectively at time stamp t, and are time-varying biases, and are noise values following a zero-mean Gaussian distribution; then a coordinate system transformation is implemented to eliminate device differences; the direction at time t can be updated using the relative direction Ω(t) between two discrete time instants t and t-1 according to the following equation: where ω(t - 1) is the angular velocity of the body with respect to the navigation frame in the body frame at time (t - 1), The measurements x e [ω, α] from the body frame to the navigation frame can be represented by where denotes the Hamilton product between two quaternions. The IMU data of pedestrian motion is dynamically segmented into straight and corner state pieces by using adaptive sliding window corner detection technology; Temporal and spatial features in different state motion pieces are extracted by using a spatiotemporal variance attention network, and the two features are fused; A regression relationship between input features and position information is predicted by training a model based on real position coordinate information, and the ability of the model to determine the walking trajectory of pedestrians to realize pedestrian positioning is based on the relationship; the IMU time series of pedestrians and their real position coordinates are input into the positioning model, the pre-trained model updates and adjusts the model parameters, and after the above pre-trained model is obtained, the IMU data of pedestrians in other scenes is input to obtain the walking trajectory of pedestrians to realize the ability of pedestrian positioning.
2. The method of claim 1, wherein, The adaptive sliding window corner detection technology is used to dynamically segment the IMU data of pedestrian motion into straight and corner state pieces, which comprises: A classifier based on a Transformer-base is used to classify the preprocessed pedestrian data, and a voting mechanism and continuity detection are used to continuously analyze the IMU data stream and automatically adjust the window size, and finally the classified pedestrian motion pieces are obtained.
3. The method of claim 1, wherein, The spatiotemporal variance attention network uses spatial features and variance embedding to jointly input an encoder, adjusts the attention weight through variance-aware self-attention calculation, and fuses spatial, variance and time information into a single vector representation through a multi-head attention sublayer of the encoder. The device comprises: where W Q , W K , and W V are the query, key, and value transformation weight matrices, respectively, W var is the variance weight matrix, d k is the dimensionality of the keys, and A var is the final variance-adjusted attention score.
4. A pedestrian inertial positioning device based on adaptive sliding window and space-time network model, which can implement the method of any one of claims 1 to 3, characterized in that, A data collection and preprocessing module: collects the IMU motion data of pedestrians, including acceleration and angular velocity information, and pre-processes the data, including denoising, standardization and coordinate system rotation; IMU data of pedestrian walking is obtained through a sensor device, an IMU data model is constructed, coordinate system transformation is realized, and device differences are eliminated; A sliding window corner detection module: the IMU data of pedestrian motion is dynamically segmented into straight and corner state pieces by using adaptive sliding window corner detection technology; A spatiotemporal variance feature fusion module: temporal and spatial features in different state motion pieces are extracted by using a spatiotemporal variance attention network, and the two features are fused; A position prediction module: a regression relationship between input features and position information is predicted by training a model based on real position coordinate information, and the ability of the model to determine the walking trajectory of pedestrians to realize pedestrian positioning is based on the relationship; the IMU time series of pedestrians and their real position coordinates are input into the positioning model, the pre-trained model updates and adjusts the model parameters, and after the above pre-trained model is obtained, the IMU data of pedestrians in other scenes is input to output the walking trajectory of pedestrians and realize the ability of pedestrian positioning. The sliding window corner detection module is specifically used for:
5. The apparatus of claim 4, wherein, A classifier based on a Transformer-base is used to classify the preprocessed pedestrian data, and a voting mechanism and continuity detection are used to continuously analyze the IMU data stream and automatically adjust the window size, and finally the classified pedestrian motion pieces are obtained. The spatiotemporal variance feature fusion module is specifically used for:
6. The apparatus of claim 4, wherein, The spatiotemporal variance attention network utilizes spatial features and variance embedding to jointly input an encoder, adjusts attention weights through variance-aware self-attention calculation, and fuses spatial, variance and time information into a single vector representation through an output of a multi-head attention sublayer.