PDR-UWB indoor positioning method based on graph optimization fusion

By adopting multi-parameter constraint step detection algorithm, BP neural network step length estimation and recursive neural network heading angle error prediction in indoor positioning technology, and performing graph optimization and fusion, the problems of positioning error and cumulative drift in the existing technology are solved, and high-precision and robust indoor positioning effect are achieved.

CN119521377APending Publication Date: 2025-02-25EAST CHINA NORMAL UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411527440.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing indoor positioning technology based on UWB and PDR has positioning errors and cumulative drift problems in complex environments, making it difficult to meet the needs of high-precision indoor positioning.

Method used

The pace detection algorithm based on multi-parameter constraints, step size estimation of BP neural network, heading angle error prediction of recurrent neural networks, and the PDR results are fused with UWB positioning data through graph optimization method to reduce cumulative error and non-line-of-sight interference.

Benefits of technology

It significantly improves the accuracy and robustness of indoor positioning, reduces cumulative errors and non-line-of-sight interference, and meets the needs of high-precision indoor positioning in smart homes, emergency rescue and other scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119521377A_ABST
    Figure CN119521377A_ABST
Patent Text Reader

Abstract

The invention discloses a PDR-UWB indoor positioning method based on graph optimization fusion, and aims to improve the positioning precision and stability in a complex indoor environment. The traditional pedestrian dead reckoning (PDR) technology is easily influenced by the problems of sensor noise, drift accumulation and the like in the aspects of step detection, step length estimation and course angle calculation, so that the positioning error is gradually increased. Although the ultra wide band (Ultra Wide Band, UWB) technology has relatively high positioning precision, the positioning effect of the ultra wide band (Ultra Wide Band, UWB) technology is easily influenced by non-line of sight (Non-Line of Sights, NLOS) and a multipath effect. Therefore, by improving each link of the PDR technology and introducing the graph optimization algorithm to fuse UWB and PDR positioning results, the precision and robustness of indoor positioning are remarkably improved, and the method is suitable for high-precision positioning requirements of scenes such as smart home, indoor navigation and emergency rescue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of indoor positioning technology, and in particular to an improved indoor positioning method based on graph optimization fusion of pedestrian dead reckoning (Pedestrian Dead Reckoning, PDR) and ultra wide band (Ultra Wide Band, UWB) positioning technology. Background Art

[0002] With the increasing demand for high-precision indoor positioning in the fields of smart home, emergency rescue, indoor navigation, etc., the traditional global positioning system (GPS) cannot meet the demand in indoor environments due to severe signal interference and insufficient positioning accuracy. Indoor positioning technology based on UWB (Ultra Wide Band) and Pedestrian Dead Reckoning (Pedestrian Dead Reckoning) has therefore received widespread attention. UWB technology can provide relatively reliable location information due to its strong anti-interference ability and high positioning accuracy, but in complex indoor environments, non-line-of-sight (NLOS) signals and multipath effects will still cause positioning errors. PDR technology collects acceleration, angular velocity and other data through the inertial measurement unit (IMU) to infer the displacement and direction of pedestrians. Although PDR performs well in a short period of time, due to the drift and cumulative error problems of the IMU sensor itself, the positioning accuracy will gradually decrease over time.

[0003] At present, the positioning method based on the fusion of UWB and PDR has improved the positioning accuracy to a certain extent, but it still faces many challenges. First, the accuracy of step detection, step length estimation and heading angle estimation in PDR positioning directly affects the overall positioning effect. Traditional step detection is usually based on a simple threshold method, which lacks sufficient parameter constraints and is prone to misjudgment; the step length estimation method is mostly a fixed model, which is difficult to adapt to changes in different gaits and strides; heading angle estimation is easily affected by IMU drift, resulting in cumulative errors. Secondly, the fusion algorithm of PDR and UWB data is usually based on a simple filtering method or a particle filtering algorithm. Although it reduces the error to a certain extent, it fails to fully utilize the global constraint of UWB data on PDR, resulting in room for improvement in fusion accuracy and stability.

[0004] In order to solve the above problems, the present invention proposes an improved PDR-UWB indoor positioning method based on graph optimization fusion. Through the step detection algorithm based on multi-parameter constraints, BP neural network step length estimation, and recursive neural network (RNN) heading angle error prediction, the PDR positioning is accurately optimized, and then the PDR results are fused with the UWB positioning data through the graph optimization method, thereby reducing the cumulative error and non-line-of-sight interference, and significantly improving the positioning accuracy and robustness. Summary of the invention

[0005] In view of the above problems, the purpose of the present invention is to provide a UWB-PDR fusion indoor positioning method based on XGBoost and feedforward BP neural network optimization. In view of the NLOS signal interference problem in UWB positioning, the present invention adopts XGBoost network to analyze the pulse channel response (Channel Impulse Response, CIR), proposes a NLOS signal recognition method, and effectively improves the recognition accuracy. After identifying the NLOS signal, the improved residual weighted positioning algorithm is used to correct the time of arrival (TOA) measurement to further improve the positioning accuracy. In terms of PDR positioning, the present invention first proposes a step detection algorithm based on parameter constraints to enhance the accuracy and reliability of step detection. Then, a new step length estimation model is developed using the feedforward BP neural network algorithm, and the step length estimation accuracy is improved by learning the relationship between sensor data and step length. In addition, the present invention also proposes a method for constraining the heading angle using indoor map information, reducing the heading angle detection error, and providing a guarantee for combined positioning. In order to achieve higher precision indoor positioning, the present invention adopts a particle filter algorithm to fuse the positioning results of UWB and PDR, optimize the fusion process, and ensure the provision of stable and reliable positioning services in complex indoor environments. The present invention solves the limitations of the prior art and meets the urgent needs for high-precision indoor positioning in scenarios such as smart homes, emergency rescue, and medical care.

[0006] The specific technical solution for achieving the purpose of the present invention is:

[0007] Step 1, using a step detection algorithm based on multiple parameter constraints such as signal peaks and troughs, periodicity of steps, abnormal acceleration values, noise interference and dynamic thresholds to detect steps in the PDR technology;

[0008] Step 2, using a BP neural network model to estimate the stride length, wherein the BP neural network dynamically adjusts the stride length estimation result according to gait characteristics and acceleration signals to adapt to changes in different gaits;

[0009] Step 3: Use the RNN model to predict the heading angle in the IMU data and correct the error in real time to reduce the positioning error caused by the accumulated drift of the heading angle.

[0010] Step 4: The PDR estimation results from steps 1 to 3 are integrated with the UWB positioning results through a graph optimization method, a factor graph is constructed and globally optimized to make the positioning results more accurate and stable.

[0011] The steps specifically include:

[0012] 1. The method according to claim 1, characterized in that the step detection algorithm in step 1 takes into account the dynamic changes and individual differences of the steps. The accuracy and reliability of the step detection are improved by designing a step detection algorithm based on multiple parameter constraints. Specifically as follows:

[0013] (1) Definition of step cycle

[0014] The step period T is an important parameter of the step, which can be defined as the time difference between two adjacent step peaks:

[0015] T=t i+1 -t i (1)

[0016] where t i and t i+1 They represent the time points at which the acceleration peaks of two adjacent steps appear. This formula can be used to dynamically monitor the pace, thereby adapting to the pace differences of different individuals.

[0017] (2) Acceleration threshold for step detection

[0018] In order to effectively identify steps and filter noise interference, a dynamic threshold is set. th , which is dynamically adjusted based on the maximum and minimum accelerations during the step cycle:

[0019] a th =g+α·(a max -a min ) (2)

[0020] Where g is the acceleration due to gravity, which is about 9.81 m / s 2 , a max and a min are the maximum and minimum acceleration values ​​in the current step cycle, a th It is an adjustable parameter, usually ranging from 0.1 to 0.5, which is used to control the threshold sensitivity to adapt to different gait characteristics. Through this dynamic threshold, the peaks and troughs of the step signal can be detected more accurately.

[0021] (3) Prediction of step status

[0022] To ensure the continuity of step detection, a step prediction mechanism is introduced. After the acceleration peak is detected, the prediction state is entered to continuously detect whether the step cycle is completed. The prediction state can be defined as follows:

[0023]

[0024] where s t+1 Indicates the step state at time t+1. Through this state switching mechanism, the algorithm can judge the effectiveness of the step in real time and ensure the stability and accuracy of the step signal.

[0025] (4) Gait pattern fusion

[0026] The signals of acceleration a(t) and angular velocity ω(t) are combined and used in step recognition, and the formula is:

[0027] S(t)=β·a(t)+(1-β)·ω(t) (4)

[0028] Where S(t) is the fused gait signal, and β is the weight coefficient between acceleration and angular velocity, which is used to adjust the influence of different individual step characteristics, and the value range is 0 to 1 (typical value is between 0.3 and 0.7). By fusing acceleration and angular velocity signals, the step pattern can be identified more accurately, thereby improving the robustness of step detection.

[0029] 2. The method according to claim 1, characterized in that the BP neural network model in step 2 needs to be trained by the collected PDR sensor data to achieve real-time estimation of the step length. Specifically as follows:

[0030] (1) Step-size estimation model input features

[0031] The input feature vector x includes gait features, horizontal acceleration components and step period, which can be expressed as:

[0032] x=[f gait ,a horizontal ,T] (5)

[0033] Where: f gait Represents gait characteristics, which are features extracted from the step pattern or the individual's gait pattern; a horizontal is the horizontal acceleration component, representing the acceleration signal in the horizontal direction, which is used to reflect the step strength; T is the step cycle, indicating the time difference between two adjacent step peaks.

[0034] (2) Layer structure of BP neural network

[0035] The hidden layer output of the neural network can be expressed as:

[0036] h i =σ(W i ·x+b i ) (6)

[0037] Where W i is the weight matrix of the i-th layer, b i is the bias vector, σ is the activation function Sigmoid. The hidden layer output h i Used to represent combinations of nonlinear features.

[0038] (3) Step size estimation output

[0039] The final step size estimate S can be given by the output layer:

[0040] S=f(W out ·h+b out ) (7)

[0041] Where W out is the weight matrix of the output layer, b out is the bias of the output layer, and f is the output layer activation function, which is used to ensure that the step length estimation result conforms to the actual value of the step feature. The typical range of step length S is 0.5 to 1.2 meters, depending on the individual stride length differences.

[0042] (4) Back propagation training of BP neural network

[0043] During the training process, the weights and biases are adjusted through the error function E, which can be defined as:

[0044]

[0045] Where S k is the true step value of the kth sample, is the step length estimated by the network, and N is the number of samples. The model parameters are updated by minimizing E to ensure that the step length estimation result gradually approaches the actual step length.

[0046] (5) Step size dynamic adjustment mechanism

[0047] In practical applications, the step length output value can be adjusted according to the dynamic changes of the step cycle T to adapt to the step differences of different individuals. The adjusted step length estimate S adj It can be expressed as:

[0048]

[0049] Where T avgis the average step period in seconds, and γ is the influence coefficient of the step period on the step length (the value range is 0 to 1, and the typical value is between 0.2 and 0.5). This formula is used to achieve dynamic adaptation to different gaits. This formula is used to achieve dynamic adaptation to different gaits.

[0050] 3. The method according to claim 1 is characterized in that, in the heading angle error correction in step 3, the present invention uses the RNN model to predict and correct the cumulative error of the heading angle in the IMU data in real time. The RNN model can dynamically identify the pattern of heading angle drift and predict the error by learning from historical IMU data, and then compensate for it in the actual heading angle estimation. This correction process reduces the impact of the accumulated drift of the IMU sensor and significantly improves the estimation accuracy of the heading angle. Specifically including:

[0051] (1) RNN input and heading angle error definition

[0052] Input vector x t Contains acceleration and angular velocity data obtained from the IMU sensor, which is used to predict the heading angle error at time t. Assume that the historical error value is Δθ t-1 , the current input is x t , then the target of the heading angle error is:

[0053] Δθ t =f(x t ,Δθ t-1 ) (10)

[0054] Where f is the RNN model, which makes predictions by learning the pattern of historical errors.

[0055] (2) RNN hidden state update

[0056] The hidden state h of the RNN t Represents the memory of historical data and is updated through the recursive formula of the hidden layer, expressed as follows:

[0057] h t =σ(W h ·x t +U h ·h t-1 +b h ) (11)

[0058] Where: W h is the weight matrix U from the input layer to the hidden layer h is the weight matrix from hidden layer to hidden layer; b h is the bias term; σ is the activation function ReLU.

[0059] (3) Heading angle error prediction output

[0060] Use the hidden state h t Generate heading angle error prediction

[0061]

[0062] Where W out is the weight matrix of the output layer, b out is the output layer bias. Through this formula, RNN outputs the estimated value of the heading angle error at the current moment.

[0063] (4) Heading angle error correction

[0064] By the current heading angle θ t After error correction, the corrected heading angle can be obtained:

[0065]

[0066] where θ t is the initial estimated heading angle, minus the predicted error The calibration result is obtained after the calibration process. This calibration process can effectively reduce the accumulated drift of the IMU sensor and improve the accuracy of heading angle estimation.

[0067] (5) Loss function and model training

[0068] To optimize the prediction accuracy of the RNN model, the mean square error (MSE) is used as the loss function L for training:

[0069]

[0070] Where N is the number of training samples, Δθ t is the actual heading angle error, is the predicted value of the model. By minimizing L, the model parameters are adjusted to improve the accuracy of error prediction.

[0071] 4. The method according to claim 1 is characterized in that the graph optimization fusion of PDR and UWB data in step 4 constructs a factor graph through a graph optimization method, and uses PDR data and UWB data as nodes in the graph, and the nodes are connected by constraint edges. The global path optimization is realized by the graph optimization algorithm, so that the cumulative error of UWB data on PDR is globally corrected, further improving the accuracy and stability of positioning. Compared with the traditional filtering fusion method, graph optimization can more effectively utilize the constraint effect of UWB on PDR, eliminating the positioning drift caused by the accumulation of errors from a single data source.

[0072] (1) Construction of factor graph

[0073] In the factor graph, the PDR and UWB positioning results are represented as nodes v i , the constraints between nodes are through the edge e ij Connection. Node v i The position estimate can be expressed as:

[0074] p i =[x i ,y i ,z i ] T (15)

[0075] where p i For node v i The three-dimensional position coordinates of the , including x, y, and z coordinates.

[0076] (2) Definition of inter-node constraints

[0077] Edge ij Represents node v i and v j The relative position information between them is defined by the constraint equation:

[0078] z ij =p j -p i +∈ ij (16)

[0079] where z ij is the measured relative position vector, ∈ ij represents the measurement error, which is usually assumed to be Gaussian distributed.

[0080] (3) Definition of global error function

[0081] The goal of graph optimization is to minimize the global error function E, which is in the form of:

[0082]

[0083] Among them: ε is the set of all edges; is the weighted norm, the weight matrix Ω ij It is usually the inverse matrix of the covariance matrix of the measurement error, which is used to adjust the uncertainty of different measurements; by minimizing E(p), the positions of all nodes can be optimized, thereby reducing the deviation caused by PDR cumulative error and UWB error.

[0084] (4) Optimization solution

[0085] Solve E(p) using the Gauss-Newton method and update the estimated position of each node

[0086]

[0087] Where α is the learning rate, and E(p) converges to the minimum value through continuous iteration to achieve global optimization of the factor graph.

[0088] (5) Correction of position estimation after fusion

[0089] After graph optimization fusion, the final estimated position p optimized Contains comprehensive information of PDR and UWB. For the target position p target , the corrected estimate can be expressed as:

[0090]

[0091] The optimization result can effectively reduce the cumulative error of PDR and the measurement error of UWB, and improve the positioning accuracy and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Figure 1 Schematic diagram of the PDR positioning process

[0093] Figure 2 Schematic diagram of the process of PDR and UWB fusion positioning DETAILED DESCRIPTION

[0094] The present invention will be specifically described below in conjunction with the accompanying drawings and embodiments, and the technical solutions adopted by the present invention will be introduced in detail and completely. It should be noted that the described embodiments only represent a part of the present invention, not all embodiments. Therefore, the application, use, etc. of the present invention in other embodiments are not limited by the embodiments described herein.

[0095] Figure 1 : is a schematic diagram of the process of PDR positioning in the present invention. As shown in the figure, the specific steps of the present invention include:

[0096] 1.IMU data collection and step detection

[0097] (1) Acceleration signal acquisition

[0098] Use IMU sensor to obtain three-axis acceleration data a(t) = [a x (t),a y (t),a z (t)], where a x 、a y 、a z Represents the acceleration components in the x, y, and z directions. The acquisition frequency satisfies the Nyquist sampling theorem and is 100 Hz to ensure that the details of the step movement are captured.

[0099] (2) Acceleration signal preprocessing

[0100] The raw acceleration data is band-pass filtered to remove low-frequency and high-frequency interference and retain the intermediate-frequency components related to the pace. The processed acceleration signal a filtered (t) is expressed as:

[0101] a filtered (t)=BandpassFilter(a(t)) (20)

[0102] (3) Pace peak and trough detection

[0103] Detect peaks and valleys in the acceleration signal to identify the start and end of each step. Use a dynamic threshold to detect peaks, threshold a th Defined as:

[0104] a th =g+α·(a max -a min )(twenty one)

[0105] Where g is the acceleration due to gravity, which is about 9.81 m / s 2 , a max and a min are the maximum and minimum acceleration values ​​in the current step cycle, a th It is an adjustable parameter, usually ranging from 0.1 to 0.5, which is used to control the threshold sensitivity to adapt to different gait characteristics.

[0106] (4) Step cycle calculation

[0107] Calculate the time difference T between adjacent wave peaks as an estimate of the step period:

[0108] T=t i+1 -t i (twenty two)

[0109] where t i and t i+1 Respectively represent the time points at which the acceleration peaks of two adjacent steps appear. Record the period of each step for subsequent step length estimation.

[0110] (5) Abnormal step filtering

[0111] An abnormal step cycle (e.g., a significant deviation from the average cycle T) is detected. avg ), exclude the step from the step length estimation to reduce the impact of noise on positioning accuracy. The abnormal step conditions are:

[0112] |TT avg |>β·T avg (twenty three)

[0113] Where β is a threshold ratio parameter, which is usually between 0.2 and 0.5, and is taken as 0.3 in this patent.

[0114] 2. Step length estimation based on BP neural network

[0115] (1) Input feature extraction for step size estimation

[0116] The input feature x contains gait features, horizontal acceleration components, and step cycles. Gait feature f gait Indicates the unique walking characteristics of pedestrians. Horizontal acceleration component a horizontal is the sum of the squares of the accelerations in the x and y directions:

[0117]

[0118] The step cycle T represents the time interval between each step of the pedestrian and is used to dynamically adjust the step length.

[0119] (2) BP neural network model construction

[0120] The neural network structure consists of an input layer, a hidden layer, and an output layer.

[0121] The input layer accepts the feature vector: x = [f gait ,a horizontal ,T]

[0122] The output of each neuron in the hidden layer is: i =σ(W i ·x+b i )

[0123] Where σ is the activation function Sigmoid, W i and b i are the weight matrix and bias vector of the hidden layer.

[0124] (3) Step size estimation output layer

[0125] The output layer generates a step size estimate S based on the output of the hidden layer:

[0126] S=f(W out ·h+b out ) (25)

[0127] Where W out is the weight matrix of the output layer, b out is the bias of the output layer, and f is the output layer activation function, which is used to ensure that the step length estimation result conforms to the actual value of the step feature. The typical range of step length S is 0.5 to 1.5 meters, depending on the individual stride length differences.

[0128] (4) Network training and error optimization

[0129] The mean square error (MSE) is used as the loss function, which is defined as follows:

[0130]

[0131] Where N is the number of training samples, S k is the estimated step size output by the model, S true,k is the actual step size. W is continuously adjusted through the back propagation algorithm i and b i , which minimizes the loss function E and improves the step size estimation accuracy of the model.

[0132] 3. Heading Angle Error Prediction and Correction Based on RNN

[0133] (1) Heading angle calculation

[0134] The initial heading angle θ is obtained by accumulating the angular velocity ω(t) t :

[0135] θ t =θ t-1 +ω(t)·Δt (27)

[0136] Where Δt is the sampling time interval.

[0137] (2) RNN input and hidden state update

[0138] The input of the RNN model is the angular velocity data w(t) at the current moment and the hidden state h at the previous moment. t-1 :

[0139] h t =σ(W h ·x t +U h ·h t-1 +b h ) (28)

[0140] σ is the activation function ReLU, which is used to maintain the nonlinear characteristics of the state.

[0141] (3) Heading Angle Error Prediction

[0142] Through the hidden state h t Calculate the heading angle error prediction value

[0143]

[0144] Among them, W out is the weight matrix of the output layer, b out is the bias for the output layer.

[0145] (4) Heading Angle Correction

[0146] Use the predicted error value to correct the preliminary heading angle and get the final heading angle

[0147]

[0148] This step effectively reduces the impact of cumulative drift and improves positioning accuracy by dynamically correcting errors.

[0149] Figure 2 : is a flow chart of PDR and UWB fusion positioning in the present invention. As shown in the figure, the specific steps of the present invention include:

[0150] 1. Graph optimization fusion of PDR and UWB data

[0151] (1) Factor graph node definition

[0152] The PDR and UWB positioning results are taken as nodes in the graph, and each node v i Indicates position P i =[x i ,y i ,z i ] T .

[0153] (2) Define inter-node constraints

[0154] The relative position constraints between nodes (e.g., measured by PDR or UWB) are defined as:

[0155] z ij =p j -p i +∈ ij (31)

[0156] z ij To measure the relative position, ∈ ij represents the error (assuming a zero-mean Gaussian distribution).

[0157] (3) Global error function

[0158] Define a global error function that minimizes the error between each pair of nodes:

[0159]

[0160] ε is the set of all edges; is the weighted norm, the weight matrix Ω ij It is usually the inverse matrix of the covariance matrix of the measurement error, which is used to adjust the uncertainty of different measurements; by minimizing E(p), the positions of all nodes can be optimized, thereby reducing the deviation caused by PDR cumulative error and UWB error.

[0161] (4) Nonlinear optimization solution

[0162] Use Gauss-Newton to minimize E(p) and update the node positions:

[0163]

[0164] Where α is the learning rate, and E(p) converges to the minimum value through iterative solution.

[0165] 2. Position output after fusion

[0166] The final position obtained by graph optimization Indicates the optimal fusion positioning result, meeting the high-precision requirements of indoor positioning:

[0167]

Claims

1. A PDR-UWB indoor positioning method based on graph optimization fusion, characterized in that: The following steps are involved: Step 1, using a step detection algorithm based on multiple parameter constraints such as signal peaks and troughs, periodicity of steps, abnormal acceleration values, noise interference and dynamic thresholds to detect steps in the PDR technology; Step 2, using a BP neural network model to estimate the stride length, wherein the BP neural network dynamically adjusts the stride length estimation result according to gait characteristics and acceleration signals to adapt to changes in different gaits; Step 3: Use a recurrent neural network (RNN) model to predict the heading angle in the IMU data and correct the error in real time to reduce the positioning error caused by the accumulated drift of the heading angle. Step 4: The PDR estimation results from steps 1 to 3 are integrated with the UWB positioning results through a graph optimization method, a factor graph is constructed and globally optimized to make the positioning results more accurate and stable.

2. The method according to claim 1, characterized in that: The step detection algorithm in step 1 takes into account the dynamic changes and individual differences of the step. The step signal of the pedestrian is collected and recognized. The step detection algorithm combines parameters such as acceleration, angular velocity and gait pattern to improve the accuracy of step recognition. Specifically, it includes: (1) Definition of step cycle The step period T is an important parameter of the step, which can be defined as the time difference between two adjacent step peaks: T=t i+1 -t i (1) where t i and t i+1 They represent the time points at which the acceleration peaks of two adjacent steps appear, in seconds. This formula can be used to dynamically monitor the pace, thereby adapting to the differences in pace of different individuals. (2) Acceleration threshold for step detection In order to effectively identify steps and filter noise interference, a dynamic threshold is set. th , which is dynamically adjusted based on the maximum and minimum accelerations during the step cycle: a th =g+α·(a max -a min ) (2) Where g is the acceleration due to gravity, which is about 9.81 m / s 2 , a max and a min are the maximum and minimum acceleration values ​​in the current step cycle, a th It is an adjustable parameter, usually ranging from 0.1 to 0.5, which is used to control the threshold sensitivity to adapt to different gait characteristics. Through this dynamic threshold, the peaks and troughs of the step signal can be detected more accurately. (3) Prediction of step status To ensure the continuity of step detection, a step prediction mechanism is introduced. After the acceleration peak is detected, the prediction state is entered to continuously detect whether the step cycle is completed. The prediction state can be defined as follows: where s t+1 Indicates the step state at time t+1. Through this state switching mechanism, the algorithm can judge the effectiveness of the step in real time and ensure the stability and accuracy of the step signal. (4) Gait pattern fusion The signals of acceleration a(t) and angular velocity ω(t) are combined and used in step recognition, and the formula is: S(t)=β·a(t)+(1-β)·ω(t) (4) Where S(t) is the fused gait signal, and β is the weight coefficient between acceleration and angular velocity, which is used to adjust the influence of different individual step characteristics, and the value range is 0 to 1 (typical value is between 0.3 and 0.7). By fusing acceleration and angular velocity signals, the step pattern can be identified more accurately, thereby improving the robustness of step detection.

3. The method according to claim 1, characterized in that The input parameters of the BP neural network model in step 2 include gait characteristics, horizontal acceleration components, and step cycles, and the neural network structure outputs a step length estimation value that adapts to the current gait. Specifically, it includes: (1) Step-size estimation model input features The input feature vector x includes gait features, horizontal acceleration components and step period, which can be expressed as: x=[f gait ,a horizontal ,T] (5) Where: f gait Represents gait characteristics, with common feature values ​​ranging from 0 to 1, and is a feature quantity extracted from the step pattern or the individual's gait pattern; a horizontal is the horizontal acceleration component, and the calculation formula is The unit is m / s 2 The common value range is 1 to 3 m / s 2 . represents the acceleration signal in the horizontal direction, which is used to reflect the strength of the step; T is the step cycle, which represents the time difference between two adjacent step peaks. (2) Layer structure of BP neural network The hidden layer output of the neural network can be expressed as: h i =σ(W i ·x+b i ) (6) Where W i is the weight matrix of the i-th layer, b i is the bias vector, σ is the activation function Sigmoid. The hidden layer output h i Used to represent combinations of nonlinear features. (3) Step size estimation output The final step size estimate S can be given by the output layer: S=f(W out ·h+b out ) (7) Where W out is the weight matrix of the output layer, b out is the bias of the output layer, and f is the output layer activation function, which is used to ensure that the step length estimation result conforms to the actual value of the step feature. The typical range of step length S is 0.5 to 1.5 meters, depending on the individual stride length differences. (4) Back propagation training of BP neural network During the training process, the weights and biases are adjusted through the error function E, which can be defined as: Where S k is the true step value of the kth sample, is the step length estimated by the network, and N is the number of samples. The model parameters are updated by minimizing E to ensure that the step length estimation result gradually approaches the actual step length. (5) Step size dynamic adjustment mechanism In practical applications, the step length output value can be adjusted according to the dynamic changes of the step cycle T to adapt to the step differences of different individuals. The adjusted step length estimate S adj It can be expressed as: Where T avg is the average step cycle in seconds, and γ is the coefficient of the step cycle on the step length (the range is 0 to 1, and the typical value is between 0.2 and 0.5). This formula is used to achieve dynamic adaptation to different gaits.

4. The method according to claim 1, characterized in that: The RNN model described in step 3 predicts the heading angle error and performs dynamic correction by learning the historical data of the IMU sensor. Specifically, it includes: (1) RNN input and heading angle error definition Input vector x t Contains acceleration and angular velocity data obtained from the IMU sensor, which is used to predict the heading angle error at time t. Assume that the historical error value is Δθ t-1 , the current input is x t , then the target of the heading angle error is: Dth t =f(x t ,Dth t-1 ) (10) Where f is the RNN model, which makes predictions by learning the pattern of historical errors. (2) RNN hidden state update The hidden state h of the RNN t Represents the memory of historical data and is updated through the recursive formula of the hidden layer, expressed as follows: h t =σ(W h ·x t +U h ·h t-1 +b h ) (11) Where: W h is the weight matrix U from the input layer to the hidden layer h is the weight matrix from hidden layer to hidden layer; b h is the bias term; σ is the activation function ReLU. (3) Heading angle error prediction output Use the hidden state h t Generate heading angle error prediction Where W out is the weight matrix of the output layer, b out is the output layer bias. Through this formula, RNN outputs the estimated value of the heading angle error at the current moment. (4) Heading angle error correction By the current heading angle θ t After error correction, the corrected heading angle can be obtained: where θ t is the initial estimated heading angle, minus the predicted error The calibration result is obtained after the calibration process. This calibration process can effectively reduce the accumulated drift of the IMU sensor and improve the accuracy of heading angle estimation. (5) Loss function and model training To optimize the prediction accuracy of the RNN model, the mean square error (MSE) is used as the loss function L for training: Where N is the number of training samples, Δθ t is the actual heading angle error, is the predicted value of the model. By minimizing L, the model parameters are adjusted to improve the accuracy of error prediction.

5. The method according to claim 1, characterized in that: The graph optimization method described in step 4 constructs a factor graph, takes the PDR and UWB positioning results as nodes, and performs global optimization through the constraint conditions of edge connections to reduce the PDR cumulative error and UWB error and improve indoor positioning accuracy. Specifically, it includes: (1) Construction of factor graph In the factor graph, the PDR and UWB positioning results are represented as nodes v i , the constraints between nodes are through the edge e ij Connection. Node v i The position estimate can be expressed as: p i =[x i ,y i ,z i ] T (15) where p i For node v i The three-dimensional position coordinates of the , including x, y, and z coordinates. (2) Definition of inter-node constraints Edge ij Represents node v i and v j The relative position information between them is defined by the constraint equation: z ij =p j -p i +∈ ij (16) where z ij is the measured relative position vector, ∈ ij represents the measurement error, which is usually assumed to be Gaussian distributed. (3) Definition of global error function The goal of graph optimization is to minimize the global error function E, which is in the form of: Among them: ε is the set of all edges; is the weighted norm, the weight matrix Ω ij It is usually the inverse matrix of the covariance matrix of the measurement error, which is used to adjust the uncertainty of different measurements; by minimizing E(p), the positions of all nodes can be optimized, thereby reducing the deviation caused by PDR cumulative error and UWB error. (4) Optimization solution Solve E(p) using the Gauss-Newton method and update the estimated position of each node Where α is the learning rate, and E(p) converges to the minimum value through continuous iteration to achieve global optimization of the factor graph. (5) Correction of position estimation after fusion After graph optimization fusion, the final estimated position p optimized Contains comprehensive information of PDR and UWB. For the target position p target , the corrected estimate can be expressed as: The optimization result can effectively reduce the cumulative error of PDR and the measurement error of UWB, and improve the positioning accuracy and stability.