Indoor positioning method and system based on 5g channel characteristics and pedestrian dead reckoning

By using a method based on 5G channel characteristics and pedestrian dead reckoning, and employing deep convolutional networks and particle filtering algorithms, the problem of low positioning accuracy in complex indoor environments was solved, achieving high-precision and stable indoor positioning.

CN121655544BActive Publication Date: 2026-06-19CHINA UNIV OF MINING & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNIV OF MINING & TECH
Filing Date
2026-02-09
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing indoor positioning methods suffer from severe degradation of radio signals in complex indoor environments due to the absorption, reflection, diffraction, and scattering effects of obstacles, resulting in low positioning accuracy. Furthermore, fingerprint recognition algorithms lack robustness in positioning with narrowband signals.

Method used

A method based on 5G channel characteristics and pedestrian dead reckoning is adopted. The amplitude-phase composite features of the 5G channel impulse response are extracted by deep convolutional network, and the step size is calculated by machine learning based on multi-dimensional gait features. The position and heading angle are optimized by Kalman filter and extended Kalman filter. Finally, the trajectory is fused by particle filter algorithm to achieve accurate positioning.

Benefits of technology

It improves positioning accuracy and stability in complex indoor environments. Through a tightly coupled fusion mechanism of deep convolutional networks and particle filters, it optimizes the utilization efficiency and accuracy of positioning data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121655544B_ABST
    Figure CN121655544B_ABST
Patent Text Reader

Abstract

This invention discloses an indoor positioning method and system based on 5G channel characteristics and pedestrian dead reckoning, belonging to the field of indoor positioning technology. The invention first converts the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix. Then, the two-dimensional feature matrix is ​​input into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. Next, a Kalman filter is used to perform temporal smoothing optimization on the 5G positioning trajectory to obtain the optimized 5G position trajectory. This invention achieves the function of accurately locating indoor positions by fully extracting the amplitude-phase composite features of the 5G channel impulse response (CIR) using a deep convolutional network and combining it with multi-dimensional gait features for machine learning step size calculation. This not only improves the utilization efficiency of positioning data but also enables intelligent complementarity between the optimized 5G position trajectory and the dead reckoning trajectory, improving indoor positioning accuracy and stability in complex indoor environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of indoor positioning technology, specifically to an indoor positioning method and system based on 5G channel characteristics and pedestrian dead reckoning. Background Technology

[0002] Indoor Positioning System (IPS) refers to the technology used to determine the real-time location of people, equipment, or objects in an indoor environment. Because GPS signals are easily blocked and become ineffective indoors, IPS relies on other signals or sensors for positioning. Indoor positioning technology is developing towards multi-technology integration, high precision and low cost, and scene intelligence, becoming one of the underlying supporting technologies for emerging fields such as digital twins and metaverse.

[0003] Currently, indoor positioning technology plays an increasingly important role in modern society. However, existing indoor positioning methods often suffer from severe degradation of radio signals in complex indoor environments due to the absorption, reflection, diffraction, and scattering effects of obstacles, resulting in low indoor positioning accuracy. Although fingerprint recognition algorithms can utilize the multipath propagation effect of received signals in space and establish a mapping from radio signals to location, their positioning accuracy is very limited when using only narrowband signals, making their positioning robustness insufficient in complex radio environments. Therefore, it is necessary to design an indoor positioning method and system based on 5G channel characteristics and pedestrian dead reckoning. Summary of the Invention

[0004] The purpose of this invention is to overcome the problem that existing indoor positioning methods suffer from severe degradation of radio signals in complex indoor environments due to the absorption, reflection, diffraction, and scattering effects of obstacles, resulting in low indoor positioning accuracy. Although fingerprint recognition algorithms can utilize the multipath propagation effect of received signals in space and establish a mapping from radio signals to location, their positioning accuracy is very limited when using only narrowband signals. This leads to insufficient robustness in positioning under complex radio conditions. This invention provides an indoor positioning method and system based on 5G channel characteristics and pedestrian dead reckoning. It achieves the function of accurately locating indoor positions by using a deep convolutional network to fully extract the amplitude-phase composite features of the 5G channel impulse response (CIR) and combining it with multi-dimensional gait features for machine learning step size calculation. This not only improves the utilization efficiency of positioning data from the source, but also enhances the indoor positioning accuracy and stability in complex indoor environments by using a tightly coupled fusion mechanism based on particle filtering to intelligently complement the optimized 5G position trajectory and dead reckoning trajectory.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] An indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning includes the following steps.

[0007] Step A: Convert the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix, and then input the two-dimensional feature matrix into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory.

[0008] Step B: Use a Kalman filter to perform time-series smoothing optimization on the 5G location trajectory and obtain the optimized 5G location trajectory;

[0009] Step C: Calculate the sensor data to obtain the initial magnetic heading angle, and then use an extended Kalman filter to optimize the initial magnetic heading angle and obtain the optimized heading angle sequence.

[0010] Step D: Gait detection is performed based on sensor data to obtain gait frequency, and then step length is calculated based on gait frequency to obtain step length calculation value;

[0011] Step E: Based on the optimized heading angle sequence, gait frequency, and step length calculation, dead reckoning is performed and the dead reckoning trajectory is obtained;

[0012] Step F involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and dead reckoning trajectory to obtain the fused location trajectory, and then smoothing and optimizing the fused location trajectory to obtain the final positioning result.

[0013] The aforementioned indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning involves step A, which converts the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix. This two-dimensional feature matrix is ​​then input into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. The specific steps are as follows:

[0014] Step A1 involves converting the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix. The specific steps are as follows:

[0015] Step A11: Decompose the complex 5G channel impulse response (CIR) data into two physical quantities: amplitude and phase, as shown in formula (1).

[0016] ;

[0017] (1)

[0018] in, Let i be the amplitude sequence of base station i. Let be a function of the real part of a complex number. For complex 5G channel impulse response CIR data sequences, Let be a function of the imaginary part of a complex number. Let i be the phase sequence of base station i. It is the arctangent function in the four quadrants;

[0019] Step A12, find the amplitude sequence The first peak point position Then, based on the peak point position Starting from a fixed length of 1000 m, we select a fixed length of 1000 m. Window for amplitude sequence and phase sequence Synchronous pruning is performed to obtain the pruned sequence, as shown in formula (2).

[0020] (2)

[0021] in, and These are the clipped channel impulse response amplitude sequence and the clipped channel impulse response phase sequence for base station i, respectively.

[0022] Step A13, The phase sequence of the clipped channel impulse response. Perform linear scaling and make the pruned channel impulse response phase sequence With the pruned channel impulse response amplitude sequence They have the same order of magnitude, as shown in formula (3).

[0023] (3)

[0024] in, Let be the scaled channel impulse response phase sequence of base station i. It is a function with maximum value. It is a minimum value function;

[0025] Step A14: Compile the clipped channel impulse response amplitude sequence for each base station. Phase sequence of scaled channel impulse response The first and last parts are concatenated to form a feature vector, as shown in formula (4).

[0026] (4)

[0027] in, For feature vectors;

[0028] Step A15: Collect the feature vectors of all base stations. Stack them row by row to form a two-dimensional feature matrix. Specifically, as shown in formula (5),

[0029] (5)

[0030] in, For the Nth base station The amplitude of the channel impulse response after pruning For the Nth base station A scaled channel impulse response phase;

[0031] Step A2 involves inputting the two-dimensional feature matrix into a deep convolutional neural network for feature transformation and obtaining the 5G positioning trajectory. The specific steps are as follows:

[0032] Step A21, for the two-dimensional feature matrix Add a channel dimension and reshape it into a four-dimensional tensor. Then the four-dimensional tensor The input is fed into the initial convolutional block to obtain the feature tensor, as shown in formula (6).

[0033] (6)

[0034] in, For the characteristic tensor, This is a two-dimensional convolution operation. For batch normalization operations, express Activation function;

[0035] Step A22, convert the feature tensor Passing through in sequence Each feature enhancement stage performs multi-level deep feature extraction and obtains the enhancement tensor. The specific steps are as follows:

[0036] Step A221, internal feature tensor of each feature enhancement stage It requires two convolutional layers, where the output of the first convolutional layer is the convolutional feature. Then convolution features The input is fed into a channel attention model, which uses global average pooling (GAP) to compress the spatial dimensions and generate channel statistical descriptors. Specifically, as shown in formula (7),

[0037] (7)

[0038] in, Channel statistics descriptor The b-th component, where b is the index of the feature channel number, and the value of the feature channel number b ranges from 1 to 2. , For the index of the height feature channel, and the height feature channel The range of values ​​is , The index of the width feature channel, and the width feature channel The range of values ​​is , , and These are the current convolutional features. The number of channels, height, and width;

[0039] Step A23, channel statistics descriptor Input to a multilayer perceptron and generate channel weight vectors Specifically, as shown in formula (8),

[0040] (8)

[0041] in, This is the weight matrix of the first fully connected layer. This is the weight matrix for the second fully connected layer; Use the Sigmoid activation function;

[0042] Step A24, convolution features and channel weight vector Perform channel-by-channel multiplication and obtain a weighted feature map. Then weighted feature map The final output features of the residual block are formed by adding them element-wise to the input features of the residual block and passing them through a ReLU activation function, as shown in formula (9).

[0043] (9)

[0044] in, The final output features of the residual block Input features for the residual blocks;

[0045] Step A25, use a global average pooling layer to enhance the tensor All spatial dimensions are compressed to 1 to obtain the global feature vector. Specifically, as shown in formula (10),

[0046] (10)

[0047] in, It is a global feature vector The One portion, , and respectively augmenting tensors The number of channels, height, and width;

[0048] Step A26: Use a regression head composed of fully connected layers to process the global feature vector. The mapping is applied to a two-dimensional coordinate space to obtain the 5G positioning trajectory, as shown in formula (11).

[0049] (11)

[0050] in, 5G location tracking. and These are the horizontal and vertical coordinate sequences of the 5G positioning trajectory, respectively. For matrix transpose, This is the weight matrix for the third fully connected layer. This is the weight matrix for the second fully connected layer. It is a random deactivation function. This is the weight matrix of the first fully connected layer. This is the bias vector for the first fully connected layer. This is the bias vector for the third fully connected layer.

[0051] The aforementioned indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning, in step B, uses a Kalman filter to perform temporal smoothing optimization on the 5G positioning trajectory and obtain the optimized 5G positioning trajectory. The specific steps are as follows.

[0052] Step B1 involves using a Kalman filter to perform temporal smoothing optimization on the 5G positioning trajectory and obtaining the optimized 5G positioning trajectory. The Kalman filter includes a state prediction process and an observation update process, and the specific steps are as follows.

[0053] Step B11, the state prediction process, is shown in formula (12).

[0054] ;

[0055] (12)

[0056] in, for Predicted coordinates of prior state at time step For time indexing, Here is the state transition matrix. for The predicted coordinates of the posterior state at time t. for The prior coordinate covariance matrix at time t. for The posterior predicted coordinate covariance matrix at time t. This is the process noise covariance matrix in Kalman filtering;

[0057] Step B12, observe the update process, as shown in formula (13).

[0058] ;

[0059] ;

[0060] (13)

[0061] in, for The Kalman gain matrix at time 10:00. For the observation matrix, This is the observation noise covariance matrix in Kalman filtering. for The predicted 5G coordinates after Kalman filtering optimization. for 5G predicted coordinates at any given moment for The posterior prediction covariance matrix at time 1. for Kalman gain at time step It is the identity matrix;

[0062] Step B2: The position trajectory output by the Kalman filter is used as the optimized 5G position trajectory, as shown in formula (14).

[0063] (14)

[0064] in, To optimize the 5G location trajectory, The position trajectory is the output of the Kalman filter. and These are the x-axis and y-axis sequences output by the Kalman filter, respectively.

[0065] In the aforementioned indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning, step C involves calculating the sensor-collected data to obtain the initial magnetic heading angle, and then using an extended Kalman filter to optimize the initial magnetic heading angle and obtain the optimized heading angle sequence.

[0066] Step C1 involves calculating and obtaining the initial magnetic heading angle from the sensor-acquired data, wherein the sensor-acquired data includes acceleration data and magnetometer data. The specific steps are as follows.

[0067] Step C11: Calculate the sensor's roll angle using the arctangent function based on the acceleration data. With pitch angle Specifically, as shown in formula (15),

[0068] ;

[0069] (15)

[0070] in, , and The accelerometers are respectively at axis, shaft and The components of the axis;

[0071] Step C12, based on roll angle With pitch angle Construct the rotation matrix from the vehicle coordinate system to the navigation coordinate system, as shown in formula (16).

[0072] (16)

[0073] in, This is the rotation matrix from the vehicle coordinate system to the navigation coordinate system;

[0074] Step C13, according to the rotation matrix The magnetometer data is projected onto a horizontal plane to obtain the projected magnetometer data, as shown in formula (17).

[0075] (17)

[0076] in, , and The magnetometers are respectively at axis, shaft and Components of the axis, , and The magnetometer data is projected onto... axis, shaft and The components of the axis;

[0077] Step C14: Calculate the initial magnetic heading angle using the arctangent function based on the projected magnetometer data, as shown in formula (18).

[0078] (18)

[0079] in, This is the initial magnetic heading angle;

[0080] Step C2 involves optimizing the initial magnetic heading angle using an extended Kalman filter to obtain the optimized heading angle sequence. The specific steps are as follows:

[0081] Step C21, define the state prediction vector, specifically by constructing a state prediction vector containing the attitude quaternion and the gyroscope bias, as shown in formula (19).

[0082] (19);

[0083] in, This is the state prediction vector. It is a pose quaternion, and the pose quaternion , For gyroscope bias, and the gyroscope bias is ;

[0084] Step C22, based on the state prediction vector The future state is predicted a priori, and the predicted value of the prior state is obtained, as shown in formula (20).

[0085] (20)

[0086] in, for The predicted value of the prior state at time t. for The posterior state prediction at time t. For time indexing, The sampling time interval, It is a skew-symmetric matrix composed of the debiased angular velocities. for Angular velocity measurement value of gyroscope at any given time. for The attitude quaternion at time;

[0087] Step C23: Calculate the prior prediction covariance matrix using a linearized state transition function based on the prior state prediction values, as shown in formula (21).

[0088] (twenty one)

[0089] in, for The prior prediction covariance matrix at time 1. The Jacobian matrix characterizes the propagation relationship of state errors. for The posterior prediction covariance matrix at time 1. The process noise covariance matrix;

[0090] Step C24 involves correcting the predicted state using accelerometer observation data and obtaining the acceleration observation value, as shown in formula (22).

[0091] (twenty two)

[0092] in, For acceleration observations, To predict the state Mapped to the expected accelerometer measurement. It is accelerometer observation noise;

[0093] Step C25: Use the magnetometer observation data to perform heading observation and obtain the magnetometer observation value, as shown in formula (23).

[0094] (twenty three)

[0095] in, These are magnetometer observations. To predict the state Mapped to the expected heading angle measurement, To reduce noise in magnetometer observations;

[0096] Step C26 involves calculating the extended Kalman gain based on the prior prediction covariance matrix, acceleration observations, and magnetometer observations, and updating the state and covariance to obtain the optimized state prediction vector, as shown in formula (24).

[0097] ;

[0098] ;

[0099] (twenty four)

[0100] in, for The extended Kalman gain matrix at time step 1. For the observation function in the prediction state Jacobian matrix at the location, To observe the noise covariance matrix, for The optimized state prediction vector after extended Kalman filtering at time step [time]. for The posterior prediction covariance matrix at time t;

[0101] Step C27, based on the optimized state prediction vector The optimized heading angle is calculated as shown in formula (25).

[0102] ;

[0103] (25)

[0104] in, To optimize the heading angle, , , and State prediction vector Quaternions;

[0105] Step C28, optimize the heading angle Angle unwrapping is performed; specifically, the angle unwrapping process involves adjusting the optimized heading angle. The range of values compensate Integer multiples of radians and generate optimized heading angle sequences .

[0106] The aforementioned indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning, step D, involves gait detection based on sensor-collected data to obtain gait frequency, and then calculating the step length based on the gait frequency to obtain the calculated step length value. The specific steps are as follows.

[0107] Step D1 involves gait detection and obtaining gait frequency based on sensor-collected data. The specific steps are as follows:

[0108] Step D11 involves preprocessing the triaxial acceleration data collected by the inertial measurement unit and calculating the initial acceleration magnitude, as shown in formula (26).

[0109] (26)

[0110] in, The initial acceleration magnitude, , and They are respectively axis, shaft and The acceleration data of the axis, It is the acceleration due to gravity;

[0111] Step D12: Perform two-stage filtering on the initial acceleration magnitude to obtain the two-stage filtered acceleration magnitude. The two-stage filtering includes an FIR bandpass filter and a Savitzky-Golay filter. The FIR bandpass filter uses a Hamming window function to filter the initial acceleration magnitude covering the pedestrian gait frequency components to obtain the FIR-filtered acceleration magnitude. The Savitzky-Golay filter uses polynomial least squares fitting within a local window to filter the FIR-filtered acceleration magnitude and obtain the two-stage filtered acceleration magnitude.

[0112] Step D13: Based on the acceleration modulus after two-stage filtering, the peak detection method is used to identify the time of gait event occurrence and obtain the gait frequency. Specifically, the peak detection method is to find local maxima in the signal and filter out the true gait peaks by setting multiple physical constraints. The multiple physical constraints include minimum time interval constraint, minimum height constraint and minimum protrusion constraint.

[0113] The minimum time interval constraint is used to constrain the interval between two adjacent identified peaks, the minimum height constraint is used to constrain the amplitude of the peak, and the minimum prominence constraint is used to constrain the vertical prominence between the peak and the surrounding valley.

[0114] Step D2 involves calculating the stride length based on gait frequency and obtaining the calculated stride length value. The specific steps are as follows:

[0115] Step D21 involves analyzing the two-stage filtered acceleration magnitude and the optimized heading angle sequence in each gait cycle. A comprehensive feature set is extracted, which includes time-domain statistical features, frequency-domain transform features, and time-frequency wavelet features. This comprehensive feature set is then concatenated and fused with the gait duration to form a high-dimensional feature vector. ;

[0116] Step D22: Employ an extreme gradient boosting regression model based on high-dimensional feature vectors. The iterative correction and step-size prediction ensemble model are obtained through the following steps.

[0117] Step D221: Construct the model complexity regularization term, as shown in formula (27).

[0118] (27)

[0119] in, This is a regularization term for model complexity. For the first The weighted scores assigned to each leaf node It is the complexity penalty coefficient that controls the splitting of leaf nodes. These are the weight coefficients of the leaf nodes;

[0120] Step D222: Minimize an objective function that includes a loss function and a regularization term based on the model complexity regularization term. Specifically, assume the sample dataset contains... The nth sample, of which the nth sample The input feature vector of each sample is And the input feature vector The corresponding true step size is The extreme gradient boosting regression model, after experiencing After round of iterations, for the first The predicted value for each sample is At the same time in the The goal of each iteration in a round of iteration is to learn a new decision tree model. The specific objective function to be minimized is shown in formula (28).

[0121] (28)

[0122] in, For the first The objective function of the round iteration, The loss function is... Used to measure the difference between predicted and actual values. For the first The new predicted value after round of iterations, For the first In-wheel decision tree model The total number of leaf nodes;

[0123] Step D223: Approximate the objective function using a second-order Taylor expansion. The optimal decision tree model is then solved using the gradient descent algorithm. Leaf weight score This leads to the formation of an integrated model for step size prediction;

[0124] Step D23, convert the high-dimensional feature vector Input the step size prediction ensemble model and obtain the calculated step size value. .

[0125] The aforementioned indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning, in step E, dead reckoning is performed based on the optimized heading angle sequence, gait frequency, and step length calculation to obtain the dead reckoning trajectory, as shown in formula (29).

[0126] ;

[0127] (29)

[0128] in, and They are respectively The horizontal and vertical coordinates of dead reckoning at each moment. and They are respectively The horizontal and vertical coordinates of dead reckoning at each time point.

[0129] The aforementioned indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning, in step F, involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and the dead reckoning trajectory to obtain the fused location trajectory. The fused location trajectory is then smoothed and optimized to obtain the final positioning result. The specific steps are as follows:

[0130] Step F1 involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and dead reckoning trajectory to obtain the fused location trajectory. The specific steps are as follows.

[0131] Step F11 establishes a unified time reference grid to align the optimized 5G position trajectories with dead reckoning trajectories at different sampling rates in time. Specifically, the optimized 5G position trajectories are aligned to the unified time grid using the nearest neighbor interpolation method with threshold constraints, and data compensation is performed when the time difference is less than a preset threshold. The dead reckoning trajectory maps the step size and heading angle information to the unified time grid and updates the displacement increment when gait events occur.

[0132] Step F12: Using the initial position of the optimized 5G location trajectory as the center, generate... The initial particle set is constructed from particles that follow a Gaussian distribution. ,in For the first The initial position of each particle. For particle index, and the particle index The range of values ​​is , It follows a Gaussian distribution. For the initial 5G prediction coordinates, For particle noise variance, It is the identity matrix;

[0133] Step F13: Assign equal initial weights to all particles based on the initial particle set, as shown in formula (30).

[0134] (30)

[0135] in, The initial weights of the particles;

[0136] Step F14: When a gait event is detected, the particle state is updated using the step size and heading angle information provided by the dead reckoning trajectory, as shown in formula (31).

[0137] (31)

[0138] in, For the first Individual particles Location at any given moment For the first Individual particles Location at any given moment The step size for adding noise, For heading angle noise, The step-size noise variance For the heading angle noise variance, For particle indexing Update the index for dead reckoning trajectory positions with the same timestamp. For the first The optimized heading angle position;

[0139] Step F15, calculate the... Individual particles The Euclidean distance between the time point and the optimized 5G location is shown in formula (32).

[0140] (32)

[0141] in, For the first Individual particles The Euclidean distance between the time and the optimized 5G location. for 5G location optimization at specific times;

[0142] Step F16, based on the Euclidean distance between the particle and the optimized 5G position. Construct the Gaussian likelihood function and update the weights, as shown in formula (33).

[0143] (33)

[0144] in, For the updated particle weights, To update the particle weights, To observe noise;

[0145] Step F17: The weighted average method is used to calculate the fused position trajectory, as shown in formula (34).

[0146] (34)

[0147] in, for Position after moment fusion;

[0148] Step F2 involves smoothing and optimizing the fused position trajectory to obtain the final localization result. Specifically, a Savitzky-Golay filter is used for smoothing and optimization to obtain the final localization result.

[0149] An indoor positioning system based on 5G channel characteristics and pedestrian dead reckoning includes a 5G positioning module, a 5G location trajectory optimization module, a heading angle calculation module, a gait length measurement module, a dead reckoning module, and a positioning fusion module. The 5G positioning module converts the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix, then inputs the two-dimensional feature matrix into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. The 5G location trajectory optimization module uses a Kalman filter to perform temporal smoothing optimization on the 5G positioning trajectory to obtain the optimized 5G location trajectory. The heading angle calculation module calculates the direction of travel of the sensor-collected data. The system calculates and obtains the initial magnetic heading angle, then optimizes the initial magnetic heading angle using an extended Kalman filter to obtain an optimized heading angle sequence. The gait step length calculation module is used to detect gait based on sensor data and obtain gait frequency, then calculates the step length based on the gait frequency to obtain the calculated step length value. The dead reckoning module is used to perform dead reckoning based on the optimized heading angle sequence, gait frequency, and calculated step length value to obtain the dead reckoning trajectory. The positioning fusion module is used to perform deep fusion of the optimized 5G position trajectory and the dead reckoning trajectory using a particle filter algorithm to obtain the fused position trajectory, then smooths and optimizes the fused position trajectory to obtain the final positioning result.

[0150] The beneficial effects of this invention are as follows: The indoor positioning method and system based on 5G channel characteristics and pedestrian dead reckoning of this invention first converts the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix. Then, the two-dimensional feature matrix is ​​input into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. Next, a Kalman filter is used to perform temporal smoothing optimization on the 5G positioning trajectory to obtain the optimized 5G positioning trajectory. Subsequently, the sensor-collected data is calculated to obtain the initial magnetic heading angle, and then an extended Kalman filter is used to optimize the initial magnetic heading angle to obtain the optimized 5G positioning trajectory. The optimized heading angle sequence is obtained, then gait detection is performed based on sensor data to obtain gait frequency, and step length is calculated based on gait frequency to obtain step length calculation value. Next, dead reckoning is performed based on the optimized heading angle sequence, gait frequency, and step length calculation value to obtain dead reckoning trajectory. Finally, the optimized 5G position trajectory and dead reckoning trajectory are deeply fused using a particle filter algorithm to obtain fused position trajectory. The fused position trajectory is then smoothed and optimized to obtain the final positioning result. This effectively realizes that the indoor positioning method and system can accurately locate indoor position trajectories by using a deep convolutional network to fully extract the amplitude and phase composite features of the 5G channel impulse response (CIR) and combining it with multi-dimensional gait features for machine learning step length calculation. This not only improves the utilization efficiency of positioning data from the source, but also overcomes the limitations of single technology by using a tightly coupled fusion mechanism based on particle filtering to intelligently complement the optimized 5G position trajectory and dead reckoning trajectory, thus improving the indoor positioning accuracy and positioning stability in complex indoor environments. Attached Figure Description

[0151] Figure 1 This is an overall flowchart of the indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning of the present invention;

[0152] Figure 2 This is a cumulative distribution function (CDF) curve of the positioning error in an embodiment of the present invention;

[0153] Figure 3 This is a 5G channel impulse response CIR positioning trajectory diagram in an embodiment of the present invention;

[0154] Figure 4 This is a dead reckoning PDR positioning trajectory diagram in an embodiment of the present invention;

[0155] Figure 5 This is a positioning trajectory diagram of the fusion positioning method of the present invention used in an embodiment of the present invention;

[0156] Figure 6 This is a real trajectory diagram in an embodiment of the present invention. Detailed Implementation

[0157] The present invention will now be further described with reference to the accompanying drawings.

[0158] like Figure 1 As shown, the indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning of the present invention includes the following steps:

[0159] Step A involves converting the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix, then inputting the two-dimensional feature matrix into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. The specific steps are as follows.

[0160] Step A1 involves converting the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix. The specific steps are as follows:

[0161] Step A11: Decompose the complex 5G channel impulse response (CIR) data into two physical quantities: amplitude and phase, as shown in formula (1).

[0162] ;

[0163] (1)

[0164] in, Let i be the amplitude sequence of base station i. Let be a function of the real part of a complex number. For complex 5G channel impulse response CIR data sequences, Let be a function of the imaginary part of a complex number. Let i be the phase sequence of base station i. It is the arctangent function in the four quadrants;

[0165] Step A12, find the amplitude sequence The first peak point position Then, based on the peak point position Starting from a fixed length of 1000 m, we select a fixed length of 1000 m. Window for amplitude sequence and phase sequence Synchronous pruning is performed to obtain the pruned sequence, as shown in formula (2).

[0166] (2)

[0167] in, and These are the clipped channel impulse response amplitude sequence and the clipped channel impulse response phase sequence for base station i, respectively.

[0168] Step A13, The phase sequence of the clipped channel impulse response. Perform linear scaling and make the pruned channel impulse response phase sequence With the pruned channel impulse response amplitude sequence They have the same order of magnitude, as shown in formula (3).

[0169] (3)

[0170] in, Let be the scaled channel impulse response phase sequence of base station i. It is a function with maximum value. It is a minimum value function;

[0171] Step A14: Compile the clipped channel impulse response amplitude sequence for each base station. Phase sequence of scaled channel impulse response The first and last parts are concatenated to form a feature vector, as shown in formula (4).

[0172] (4)

[0173] in, For feature vectors;

[0174] Step A15: Collect the feature vectors of all base stations. Stack them row by row to form a two-dimensional feature matrix. Specifically, as shown in formula (5),

[0175] (5)

[0176] in, For the Nth base station The amplitude of the channel impulse response after pruning For the Nth base station A scaled channel impulse response phase;

[0177] Step A2 involves inputting the two-dimensional feature matrix into a deep convolutional neural network for feature transformation and obtaining the 5G positioning trajectory. The specific steps are as follows:

[0178] Step A21, for the two-dimensional feature matrix Add a channel dimension and reshape it into a four-dimensional tensor. Then the four-dimensional tensor The input is fed into the initial convolutional block to obtain the feature tensor, as shown in formula (6).

[0179] (6)

[0180] in, For the characteristic tensor, This is a two-dimensional convolution operation. For batch normalization operations, express Activation function;

[0181] Step A22, convert the feature tensor Passing through in sequence Each feature enhancement stage performs multi-level deep feature extraction and obtains the enhancement tensor. The specific steps are as follows:

[0182] Step A221, internal feature tensor of each feature enhancement stage It requires two convolutional layers, where the output of the first convolutional layer is the convolutional feature. Then convolution features The input is fed into a channel attention model, which uses global average pooling (GAP) to compress the spatial dimensions and generate channel statistical descriptors. Specifically, as shown in formula (7),

[0183] (7)

[0184] in, Channel statistics descriptor The b-th component, where b is the index of the feature channel number, and the value of the feature channel number b ranges from 1 to 2. , For the index of the height feature channel, and the height feature channel The range of values ​​is , The index of the width feature channel, and the width feature channel The range of values ​​is , , and These are the current convolutional features. The number of channels, height, and width;

[0185] Step A23, channel statistics descriptor Input to a multilayer perceptron and generate channel weight vectors Specifically, as shown in formula (8),

[0186] (8)

[0187] in, This is the weight matrix of the first fully connected layer. This is the weight matrix for the second fully connected layer; Use the Sigmoid activation function;

[0188] Step A24, convolution features and channel weight vector Perform channel-by-channel multiplication and obtain a weighted feature map. Then weighted feature map The final output features of the residual block are formed by adding them element-wise to the input features of the residual block and passing them through a ReLU activation function, as shown in formula (9).

[0189] (9)

[0190] in, The final output features of the residual block Input features for the residual blocks;

[0191] Step A25, use a global average pooling layer to enhance the tensor All spatial dimensions are compressed to 1 to obtain the global feature vector. Specifically, as shown in formula (10),

[0192] (10)

[0193] in, It is a global feature vector The One portion, , and respectively augmenting tensors The number of channels, height, and width;

[0194] Step A26: Use a regression head composed of fully connected layers to process the global feature vector. The mapping is applied to a two-dimensional coordinate space to obtain the 5G positioning trajectory, as shown in formula (11).

[0195] (11)

[0196] in, 5G location tracking. and These are the horizontal and vertical coordinate sequences of the 5G positioning trajectory, respectively. For matrix transpose, This is the weight matrix for the third fully connected layer. This is the weight matrix for the second fully connected layer. It is a random deactivation function. This is the weight matrix of the first fully connected layer. This is the bias vector for the first fully connected layer. This is the bias vector for the third fully connected layer.

[0197] Step B involves using a Kalman filter to perform time-series smoothing optimization on the 5G location trajectory and obtaining the optimized 5G location trajectory. The specific steps are as follows.

[0198] Step B1 involves using a Kalman filter to perform temporal smoothing optimization on the 5G positioning trajectory and obtaining the optimized 5G positioning trajectory. The Kalman filter includes a state prediction process and an observation update process, and the specific steps are as follows.

[0199] Step B11, the state prediction process, is shown in formula (12).

[0200] ;

[0201] (12)

[0202] in, for Predicted coordinates of prior state at time step For time indexing, Here is the state transition matrix. for The predicted coordinates of the posterior state at time t. for The prior coordinate covariance matrix at time t. for The posterior predicted coordinate covariance matrix at time t. This is the process noise covariance matrix in Kalman filtering;

[0203] Step B12, observe the update process, as shown in formula (13).

[0204] ;

[0205] ;

[0206] (13)

[0207] in, for The Kalman gain matrix at time 10:00. For the observation matrix, This is the observation noise covariance matrix in Kalman filtering. for The predicted 5G coordinates after Kalman filtering optimization. for 5G predicted coordinates at any given moment for The posterior prediction covariance matrix at time 1. for Kalman gain at time step It is the identity matrix;

[0208] Step B2: The position trajectory output by the Kalman filter is used as the optimized 5G position trajectory, as shown in formula (14).

[0209] (14)

[0210] in, To optimize the 5G location trajectory, The position trajectory is the output of the Kalman filter. and These are the x-axis and y-axis sequences output by the Kalman filter, respectively.

[0211] Step C: Calculate the sensor data to obtain the initial magnetic heading angle, and then use an extended Kalman filter to optimize the initial magnetic heading angle and obtain the optimized heading angle sequence.

[0212] Step C1 involves calculating and obtaining the initial magnetic heading angle from the sensor-acquired data, wherein the sensor-acquired data includes acceleration data and magnetometer data. The specific steps are as follows.

[0213] Step C11: Calculate the sensor's roll angle using the arctangent function based on the acceleration data. With pitch angle Specifically, as shown in formula (15),

[0214] ;

[0215] (15)

[0216] in, , and The accelerometers are respectively at axis, shaft and The components of the axis;

[0217] Step C12, based on roll angle With pitch angle Construct the rotation matrix from the vehicle coordinate system to the navigation coordinate system, as shown in formula (16).

[0218] (16)

[0219] in, This is the rotation matrix from the vehicle coordinate system to the navigation coordinate system;

[0220] Step C13, according to the rotation matrix The magnetometer data is projected onto a horizontal plane to obtain the projected magnetometer data, as shown in formula (17).

[0221] (17)

[0222] in, , and The magnetometers are respectively at axis, shaft and Components of the axis, , and The magnetometer data is projected onto... axis, shaft and The components of the axis;

[0223] Step C14: Calculate the initial magnetic heading angle using the arctangent function based on the projected magnetometer data, as shown in formula (18).

[0224] (18)

[0225] in, This is the initial magnetic heading angle;

[0226] Step C2 involves optimizing the initial magnetic heading angle using an extended Kalman filter to obtain the optimized heading angle sequence. The specific steps are as follows:

[0227] Step C21, define the state prediction vector, specifically by constructing a state prediction vector containing the attitude quaternion and the gyroscope bias, as shown in formula (19).

[0228] (19);

[0229] in, This is the state prediction vector. It is a pose quaternion, and the pose quaternion , For gyroscope bias, and the gyroscope bias is ;

[0230] Step C22, based on the state prediction vector The future state is predicted a priori, and the predicted value of the prior state is obtained, as shown in formula (20).

[0231] (20)

[0232] in, for The predicted value of the prior state at time t. for The posterior state prediction at time t. For time indexing, The sampling time interval, It is a skew-symmetric matrix composed of the debiased angular velocities. for Angular velocity measurement value of gyroscope at any given time. for The attitude quaternion at time;

[0233] Step C23: Calculate the prior prediction covariance matrix using a linearized state transition function based on the prior state prediction values, as shown in formula (21).

[0234] (twenty one)

[0235] in, for The prior prediction covariance matrix at time 1. The Jacobian matrix characterizes the propagation relationship of state errors. for The posterior prediction covariance matrix at time 1. The process noise covariance matrix;

[0236] Step C24 involves correcting the predicted state using accelerometer observation data and obtaining the acceleration observation value, as shown in formula (22).

[0237] (twenty two)

[0238] in, For acceleration observations, To predict the state Mapped to the expected accelerometer measurement. It is accelerometer observation noise;

[0239] Step C25: Use the magnetometer observation data to perform heading observation and obtain the magnetometer observation value, as shown in formula (23).

[0240] (twenty three)

[0241] in, These are magnetometer observations. To predict the state Mapped to the expected heading angle measurement, To reduce noise in magnetometer observations;

[0242] Step C26 involves calculating the extended Kalman gain based on the prior prediction covariance matrix, acceleration observations, and magnetometer observations, and updating the state and covariance to obtain the optimized state prediction vector, as shown in formula (24).

[0243] ;

[0244] ;

[0245] (twenty four)

[0246] in, for The extended Kalman gain matrix at time step 1. For the observation function in the prediction state Jacobian matrix at the location, To observe the noise covariance matrix, for The optimized state prediction vector after extended Kalman filtering at time step [time]. for The posterior prediction covariance matrix at time t;

[0247] Step C27, based on the optimized state prediction vector The optimized heading angle is calculated as shown in formula (25).

[0248] ;

[0249] (25)

[0250] in, To optimize the heading angle, , , and State prediction vector Quaternions;

[0251] Step C28, optimize the heading angle Angle unwrapping is performed; specifically, the angle unwrapping process involves adjusting the optimized heading angle. The range of values compensate Integer multiples of radians and generate optimized heading angle sequences .

[0252] Step D involves performing gait detection based on sensor-collected data and obtaining gait frequency. Then, the stride length is calculated based on the gait frequency to obtain the calculated stride length value. The specific steps are as follows.

[0253] Step D1 involves gait detection and obtaining gait frequency based on sensor-collected data. The specific steps are as follows:

[0254] Step D11 involves preprocessing the triaxial acceleration data collected by the inertial measurement unit and calculating the initial acceleration magnitude, as shown in formula (26).

[0255] (26)

[0256] in, The initial acceleration magnitude, , and They are respectively axis, shaft and The acceleration data of the axis, It is the acceleration due to gravity;

[0257] Step D12: Perform two-stage filtering on the initial acceleration magnitude to obtain the two-stage filtered acceleration magnitude. The two-stage filtering includes an FIR bandpass filter and a Savitzky-Golay filter. The FIR bandpass filter uses a Hamming window function to filter the initial acceleration magnitude covering the pedestrian gait frequency components to obtain the FIR-filtered acceleration magnitude. The Savitzky-Golay filter uses polynomial least squares fitting within a local window to filter the FIR-filtered acceleration magnitude and obtain the two-stage filtered acceleration magnitude.

[0258] Step D13: Based on the acceleration modulus after two-stage filtering, the peak detection method is used to identify the time of gait event occurrence and obtain the gait frequency. Specifically, the peak detection method is to find local maxima in the signal and filter out the true gait peaks by setting multiple physical constraints. The multiple physical constraints include minimum time interval constraint, minimum height constraint and minimum protrusion constraint.

[0259] The minimum time interval constraint is used to constrain the interval between two adjacent identified peaks, the minimum height constraint is used to constrain the amplitude of the peak, and the minimum prominence constraint is used to constrain the vertical prominence between the peak and the surrounding valley.

[0260] Step D2 involves calculating the stride length based on gait frequency and obtaining the calculated stride length value. The specific steps are as follows:

[0261] Step D21 involves analyzing the two-stage filtered acceleration magnitude and the optimized heading angle sequence in each gait cycle. A comprehensive feature set is extracted, which includes time-domain statistical features, frequency-domain transform features, and time-frequency wavelet features. This comprehensive feature set is then concatenated and fused with the gait duration to form a high-dimensional feature vector. ;

[0262] Step D22: Employ an extreme gradient boosting regression model based on high-dimensional feature vectors. The iterative correction and step-size prediction ensemble model are obtained through the following steps.

[0263] Step D221: Construct the model complexity regularization term, as shown in formula (27).

[0264] (27)

[0265] in, This is a regularization term for model complexity. For the first The weighted scores assigned to each leaf node It is the complexity penalty coefficient that controls the splitting of leaf nodes. These are the weight coefficients of the leaf nodes;

[0266] Step D222: Minimize an objective function that includes a loss function and a regularization term based on the model complexity regularization term. Specifically, assume the sample dataset contains... The nth sample, of which the nth sample The input feature vector of each sample is And the input feature vector The corresponding true step size is The extreme gradient boosting regression model, after experiencing After round of iterations, for the first The predicted value for each sample is At the same time in the The goal of each iteration in a round of iteration is to learn a new decision tree model. The specific objective function to be minimized is shown in formula (28).

[0267] (28)

[0268] in, For the first The objective function of the round iteration, The loss function is... Used to measure the difference between predicted and actual values. For the first The new predicted value after round of iterations, For the first In-wheel decision tree model The total number of leaf nodes;

[0269] Step D223: Approximate the objective function using a second-order Taylor expansion. The optimal decision tree model is then solved using the gradient descent algorithm. Leaf weight score This leads to the formation of an integrated model for step size prediction;

[0270] Step D23, convert the high-dimensional feature vector Input the step size prediction ensemble model and obtain the calculated step size value. .

[0271] Step E involves performing dead reckoning based on the optimized heading angle sequence, gait frequency, and step length calculations, and obtaining the dead reckoning trajectory, as shown in formula (29).

[0272] ;

[0273] (29)

[0274] in, and They are respectively The horizontal and vertical coordinates of dead reckoning at each moment. and They are respectively The horizontal and vertical coordinates of dead reckoning at each time point.

[0275] Step F involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and dead reckoning trajectory to obtain the fused location trajectory. The fused location trajectory is then smoothed and optimized to obtain the final positioning result. The specific steps are as follows:

[0276] Step F1 involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and dead reckoning trajectory to obtain the fused location trajectory. The specific steps are as follows.

[0277] Step F11 establishes a unified time reference grid to align the optimized 5G position trajectories with dead reckoning trajectories at different sampling rates in time. Specifically, the optimized 5G position trajectories are aligned to the unified time grid using the nearest neighbor interpolation method with threshold constraints, and data compensation is performed when the time difference is less than a preset threshold. The dead reckoning trajectory maps the step size and heading angle information to the unified time grid and updates the displacement increment when gait events occur.

[0278] Step F12: Using the initial position of the optimized 5G location trajectory as the center, generate... The initial particle set is constructed from particles that follow a Gaussian distribution. ,in For the first The initial position of each particle. For particle index, and the particle index The range of values ​​is , It follows a Gaussian distribution. For the initial 5G prediction coordinates, For particle noise variance, It is the identity matrix;

[0279] Step F13: Assign equal initial weights to all particles based on the initial particle set, as shown in formula (30).

[0280] (30)

[0281] in, The initial weights of the particles;

[0282] Step F14: When a gait event is detected, the particle state is updated using the step size and heading angle information provided by the dead reckoning trajectory, as shown in formula (31).

[0283] (31)

[0284] in, For the first Individual particles Location at any given moment For the first Individual particles Location at any given moment The step size for adding noise, For heading angle noise, The step-size noise variance For the heading angle noise variance, For particle indexing Update the index for dead reckoning trajectory positions with the same timestamp. For the first The optimized heading angle position;

[0285] Step F15, calculate the... Individual particles The Euclidean distance between the time point and the optimized 5G location is shown in formula (32).

[0286] (32)

[0287] in, For the first Individual particles The Euclidean distance between the time and the optimized 5G location. for 5G location optimization at specific times;

[0288] Step F16, based on the Euclidean distance between the particle and the optimized 5G position. Construct the Gaussian likelihood function and update the weights, as shown in formula (33).

[0289] (33)

[0290] in, For the updated particle weights, To update the particle weights, To observe noise;

[0291] Step F17: The weighted average method is used to calculate the fused position trajectory, as shown in formula (34).

[0292] (34)

[0293] in, for Position after moment fusion;

[0294] Step F2 involves smoothing and optimizing the fused position trajectory to obtain the final localization result. Specifically, a Savitzky-Golay filter is used for smoothing and optimization to obtain the final localization result.

[0295] An indoor positioning system based on 5G channel characteristics and pedestrian dead reckoning includes a 5G positioning module, a 5G location trajectory optimization module, a heading angle calculation module, a gait length measurement module, a dead reckoning module, and a positioning fusion module. The 5G positioning module converts the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix, then inputs the two-dimensional feature matrix into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. The 5G location trajectory optimization module uses a Kalman filter to perform temporal smoothing optimization on the 5G positioning trajectory to obtain the optimized 5G location trajectory. The heading angle calculation module calculates the direction of travel of the sensor-collected data. The system calculates and obtains the initial magnetic heading angle, then optimizes the initial magnetic heading angle using an extended Kalman filter to obtain an optimized heading angle sequence. The gait step length calculation module is used to detect gait based on sensor data and obtain gait frequency, then calculates the step length based on the gait frequency to obtain the calculated step length value. The dead reckoning module is used to perform dead reckoning based on the optimized heading angle sequence, gait frequency, and calculated step length value to obtain the dead reckoning trajectory. The positioning fusion module is used to perform deep fusion of the optimized 5G position trajectory and the dead reckoning trajectory using a particle filter algorithm to obtain the fused position trajectory, then smooths and optimizes the fused position trajectory to obtain the final positioning result.

[0296] To better illustrate the effectiveness of the present invention, a specific embodiment of indoor positioning using the method of the present invention is described below.

[0297] This embodiment was conducted in a factory environment with signal obstructions such as forklifts, shelves, and metal display panels. This factory environment has a strong impact on wireless signals due to non-line-of-sight obstruction and multipath effects. Four 5G NR base stations were deployed on the inner walls of the factory building. During the experiment, personnel walked freely inside the factory with smartphones to simulate the real-world location process of pedestrians.

[0298] like Figure 2 As shown, this embodiment comprehensively demonstrates the experimental results through cumulative distribution function (CDF) curves, trajectory comparisons, and error quantification indices. Overall, the indoor positioning method of this invention significantly outperforms single 5G fingerprint positioning or dead reckoning positioning in terms of positioning accuracy, stability, and robustness, verifying the effectiveness of the indoor positioning method of this invention.

[0299] according to Figure 2 The CDF curves shown are Figures 3-6 The trajectory comparison results shown indicate that the indoor positioning method of this invention outperforms single methods in both positioning accuracy and trajectory smoothness, as detailed in Table 1.

[0300] Table 1. Location results for the factory scene;

[0301]

[0302] As shown in Table 1, in the factory test scenario of this embodiment, the 75% CDF error of the positioning method of the present invention is 0.787 m, which is an improvement of approximately 9.0% and 81.0% compared to 0.865 m for 5G positioning and 4.125 m for dead reckoning PDR positioning, respectively. The positioning method of the present invention performs particularly well in suppressing extreme errors, with a maximum error of only 1.858 m, significantly reduced by 45.0% and 87.0% compared to 3.378 m for 5G positioning and 14.309 m for dead reckoning PDR positioning, respectively. Furthermore, the fusion method of the present invention also achieves the best results in both the mean absolute error (MAE) of 0.608 m and the root mean square error (RMSE) of 0.681 m. These quantitative results fully demonstrate that the particle filter fusion strategy, by effectively integrating information from different positioning sources, greatly improves the stability and robustness of the positioning system while maintaining high accuracy.

[0303] In summary, this invention effectively solves the problems of insufficient accuracy and poor stability of single positioning technologies in complex indoor environments. Through a fusion mechanism, this invention maintains the high accuracy of 5G fingerprint positioning while effectively suppressing the cumulative error of dead reckoning (PDR) positioning, achieving sub-meter level high-precision positioning. This method not only significantly improves the reliability and robustness of the positioning system and greatly reduces the risk of extreme errors, but also meets the stringent requirements for real-time performance and continuity in practical applications. The technical solution of this invention can be widely applied to complex indoor scenarios such as smart factories, warehousing and logistics, underground parking lots, and emergency rescue, providing an efficient and reliable technical solution and solid theoretical support for high-precision indoor location services.

[0304] In summary, the indoor positioning method and system based on 5G channel characteristics and pedestrian dead reckoning of the present invention first converts the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix. Then, the two-dimensional feature matrix is ​​input into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. Next, a Kalman filter is used to perform temporal smoothing optimization on the 5G positioning trajectory to obtain the optimized 5G positioning trajectory. Subsequently, the sensor-collected data is calculated to obtain the initial magnetic heading angle, and an extended Kalman filter is used to optimize the initial magnetic heading angle to obtain the optimized... The system first performs a heading angle sequence, then gait detection based on sensor data to obtain gait frequency, and then calculates the step length based on the gait frequency. Next, dead reckoning is performed based on the optimized heading angle sequence, gait frequency, and step length calculation to obtain the dead reckoning trajectory. Finally, a particle filter algorithm is used to deeply fuse the optimized 5G position trajectory and the dead reckoning trajectory to obtain the fused position trajectory. The fused position trajectory is then smoothed and optimized to obtain the final positioning result. This effectively realizes that the indoor positioning method and system can accurately locate indoor positions by using a deep convolutional network to fully extract the amplitude and phase composite features of the 5G channel impulse response (CIR) and combining it with multi-dimensional gait features for machine learning step length calculation. This not only improves the utilization efficiency of positioning data from the source, but also overcomes the limitations of single technologies by using a tightly coupled fusion mechanism based on particle filtering to intelligently complement the optimized 5G position trajectory and the dead reckoning trajectory, thus improving the indoor positioning accuracy and stability in complex indoor environments.

[0305] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. An indoor positioning method based on 5G channel characteristics and Pedestrian Dead Reckoning, characterized in that: Includes the following steps, Step A: Convert the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix, and then input the two-dimensional feature matrix into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. Step B: Use a Kalman filter to perform time-series smoothing optimization on the 5G location trajectory and obtain the optimized 5G location trajectory; Step C: Calculate the sensor data to obtain the initial magnetic heading angle, and then use an extended Kalman filter to optimize the initial magnetic heading angle and obtain the optimized heading angle sequence. Step D: Gait detection is performed based on sensor data to obtain gait frequency, and then step length is calculated based on gait frequency to obtain step length calculation value; Step E: Based on the optimized heading angle sequence, gait frequency, and step length calculation, dead reckoning is performed and the dead reckoning trajectory is obtained; Step F involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and dead reckoning trajectory to obtain the fused location trajectory, and then smoothing and optimizing the fused location trajectory to obtain the final positioning result. 2.The indoor positioning method based on 5G channel features and Pedestrian Dead Reckoning according to claim 1, characterized in that: Step A involves converting the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix, then inputting the two-dimensional feature matrix into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. The specific steps are as follows. Step A1 involves converting the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix. The specific steps are as follows: Step A11: Decompose the complex 5G channel impulse response (CIR) data into two physical quantities: amplitude and phase, as shown in formula (1). ; (1) in, Let i be the amplitude sequence of base station i. Let be a function of the real part of a complex number. For complex 5G channel impulse response CIR data sequences, Let be a function of the imaginary part of a complex number. Let i be the phase sequence of base station i. It is the arctangent function in the four quadrants; Step A12, find the amplitude sequence The first peak point position Then, based on the peak point position Starting from a fixed length of 1000 m, we select a fixed length of 1000 m. Window for amplitude sequence and phase sequence Synchronous pruning is performed to obtain the pruned sequence, as shown in formula (2). (2) in, and These are the clipped channel impulse response amplitude sequence and the clipped channel impulse response phase sequence for base station i, respectively. Step A13, The phase sequence of the clipped channel impulse response. Perform linear scaling and make the pruned channel impulse response phase sequence With the pruned channel impulse response amplitude sequence They have the same order of magnitude, as shown in formula (3). (3) in, Let be the scaled channel impulse response phase sequence of base station i. It is a function with maximum value. It is a minimum value function; Step A14: Compile the clipped channel impulse response amplitude sequence for each base station. Phase sequence of scaled channel impulse response The first and last parts are concatenated to form a feature vector, as shown in formula (4). (4) in, For feature vectors; Step A15: Collect the feature vectors of all base stations. Stack them row by row to form a two-dimensional feature matrix. Specifically, as shown in formula (5), (5) in, For the Nth base station The amplitude of the channel impulse response after pruning For the Nth base station A scaled channel impulse response phase; Step A2 involves inputting the two-dimensional feature matrix into a deep convolutional neural network for feature transformation and obtaining the 5G positioning trajectory. The specific steps are as follows: Step A21, for the two-dimensional feature matrix Add a channel dimension and reshape it into a four-dimensional tensor. Then the four-dimensional tensor The input is fed into the initial convolutional block to obtain the feature tensor, as shown in formula (6). (6) in, For the characteristic tensor, This is a two-dimensional convolution operation. For batch normalization operations, express Activation function; Step A22, convert the feature tensor Passing through in sequence Each feature enhancement stage performs multi-level deep feature extraction and obtains the enhancement tensor. The specific steps are as follows: Step A221, internal feature tensor of each feature enhancement stage It requires two convolutional layers, where the output of the first convolutional layer is the convolutional feature. Then convolution features The input is fed into a channel attention model, which uses global average pooling (GAP) to compress the spatial dimension and generate channel statistical descriptors. Specifically, as shown in formula (7), (7) in, Channel statistics descriptor The b-th component, where b is the index of the feature channel number, and the value of the feature channel number b ranges from 1 to 2. , For the index of the height feature channel, and the height feature channel The range of values ​​is , The index of the width feature channel, and the width feature channel The range of values ​​is , , and These are the current convolutional features. The number of channels, height, and width; Step A23, channel statistics descriptor Input to a multilayer perceptron and generate channel weight vectors Specifically, as shown in formula (8), (8) in, This is the weight matrix of the first fully connected layer. This is the weight matrix for the second fully connected layer; Use the Sigmoid activation function; Step A24, convolution features and channel weight vector Perform channel-by-channel multiplication and obtain a weighted feature map. Then weighted feature map The residual block's final output features are formed by adding them element-wise to the input features and then passing them through a ReLU activation function, as shown in formula (9). (9) in, The final output features of the residual block Input features for the residual blocks; Step A25, use a global average pooling layer to enhance the tensor All spatial dimensions are compressed to 1 to obtain the global feature vector. Specifically, as shown in formula (10), (10) in, It is a global feature vector The One portion, , and respectively augmenting tensor The number of channels, height, and width; Step A26: Use a regression head composed of fully connected layers to process the global feature vector. The mapping is applied to a two-dimensional coordinate space to obtain the 5G positioning trajectory, as shown in formula (11). (11) in, 5G location tracking. and These are the horizontal and vertical coordinate sequences of the 5G positioning trajectory, respectively. For matrix transpose, This is the weight matrix for the third fully connected layer. This is the weight matrix for the second fully connected layer. It is a random deactivation function. This is the weight matrix of the first fully connected layer. This is the bias vector for the first fully connected layer. This is the bias vector for the third fully connected layer.

3. The indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning according to claim 2, characterized in that: Step B involves using a Kalman filter to perform time-series smoothing optimization on the 5G location trajectory and obtaining the optimized 5G location trajectory. The specific steps are as follows. Step B1 involves using a Kalman filter to perform temporal smoothing optimization on the 5G positioning trajectory and obtaining the optimized 5G positioning trajectory. The Kalman filter includes a state prediction process and an observation update process, and the specific steps are as follows. Step B11, the state prediction process, is shown in formula (12). ; (12) in, for Predicted coordinates of the prior state at time t. For time indexing, Here is the state transition matrix. for The predicted coordinates of the posterior state at time t. for The prior coordinate covariance matrix at time t. for The posterior predicted coordinate covariance matrix at time t. This is the process noise covariance matrix in Kalman filtering; Step B12, observe the update process, as shown in formula (13). ; ; (13) in, for The Kalman gain matrix at time 10:

00. For the observation matrix, This is the observation noise covariance matrix in Kalman filtering. for The predicted 5G coordinates after Kalman filtering optimization. for 5G predicted coordinates at any given moment for The posterior prediction covariance matrix at time 1. for Kalman gain at time step It is the identity matrix; Step B2: The position trajectory output by the Kalman filter is used as the optimized 5G position trajectory, as shown in formula (14). (14) in, To optimize the 5G location trajectory, The position trajectory is the output of the Kalman filter. and These are the x-axis and y-axis sequences output by the Kalman filter, respectively.

4. The indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning according to claim 3, characterized in that: Step C: Calculate the sensor data to obtain the initial magnetic heading angle, and then use an extended Kalman filter to optimize the initial magnetic heading angle and obtain the optimized heading angle sequence. Step C1 involves calculating and obtaining the initial magnetic heading angle from the sensor-acquired data, wherein the sensor-acquired data includes acceleration data and magnetometer data. The specific steps are as follows. Step C11: Calculate the sensor's roll angle using the arctangent function based on the acceleration data. With pitch angle Specifically, as shown in formula (15), ; (15) in, , and The accelerometers are respectively at axis, shaft and The components of the axis; Step C12, based on roll angle With pitch angle Construct the rotation matrix from the vehicle coordinate system to the navigation coordinate system, as shown in formula (16). (16) in, This is the rotation matrix from the vehicle coordinate system to the navigation coordinate system; Step C13, according to the rotation matrix The magnetometer data is projected onto a horizontal plane to obtain the projected magnetometer data, as shown in formula (17). (17) in, , and The magnetometers are respectively at axis, shaft and Components of the axis, , and The magnetometer data is projected onto... axis, shaft and The components of the axis; Step C14: Calculate the initial magnetic heading angle using the arctangent function based on the projected magnetometer data, as shown in formula (18). (18) in, This is the initial magnetic heading angle; Step C2 involves optimizing the initial magnetic heading angle using an extended Kalman filter to obtain the optimized heading angle sequence. The specific steps are as follows: Step C21, define the state prediction vector, specifically by constructing a state prediction vector containing the attitude quaternion and the gyroscope bias, as shown in formula (19). (19); in, This is the state prediction vector. It is a pose quaternion, and the pose quaternion , This is the gyroscope bias, and the gyroscope bias is... ; Step C22, based on the state prediction vector The future state is predicted a priori, and the predicted value of the prior state is obtained, as shown in formula (20). (20) in, for The predicted prior state value at time t. for The posterior state prediction at time t. For time indexing, The sampling time interval, It is a skew-symmetric matrix composed of the debiased angular velocities. for Angular velocity measurement value of gyroscope at any given moment. for The attitude quaternion at a given moment; Step C23: Calculate the prior prediction covariance matrix using a linearized state transition function based on the prior state prediction values, as shown in formula (21). (21) in, for The prior prediction covariance matrix at time 1. The Jacobian matrix characterizes the propagation relationship of state errors. for The posterior prediction covariance matrix at time 1. The process noise covariance matrix; Step C24 involves correcting the predicted state using accelerometer observation data and obtaining the acceleration observation value, as shown in formula (22). (22) in, For acceleration observations, To predict the state Mapped to the expected accelerometer measurement. It is accelerometer observation noise; Step C25: Use the magnetometer observation data to perform heading observation and obtain the magnetometer observation value, as shown in formula (23). (23) in, These are magnetometer observations. To predict the state Mapped to the expected heading angle measurement, To reduce noise in magnetometer observations; Step C26 involves calculating the extended Kalman gain based on the prior prediction covariance matrix, acceleration observations, and magnetometer observations, and updating the state and covariance to obtain the optimized state prediction vector, as shown in formula (24). ; ; (24) in, for The extended Kalman gain matrix at time step 1. For the observation function in the prediction state Jacobian matrix at the location, To observe the noise covariance matrix, for The optimized state prediction vector after extended Kalman filtering at time step [time]. for The posterior prediction covariance matrix at time t; Step C27, based on the optimized state prediction vector The optimized heading angle is calculated as shown in formula (25). ; (25) in, To optimize the heading angle, , , and State prediction vector Quaternions; Step C28, optimize the heading angle Angle unwrapping is performed; specifically, the angle unwrapping process involves adjusting the optimized heading angle. The range of values compensate Integer multiples of radians and generate optimized heading angle sequences .

5. The indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning according to claim 4, characterized in that: Step D involves performing gait detection based on sensor-collected data and obtaining gait frequency. Then, the stride length is calculated based on the gait frequency to obtain the calculated stride length value. The specific steps are as follows. Step D1 involves gait detection and obtaining gait frequency based on sensor-collected data. The specific steps are as follows: Step D11 involves preprocessing the triaxial acceleration data collected by the inertial measurement unit and calculating the initial acceleration magnitude, as shown in formula (26). (26) in, The initial acceleration magnitude, , and They are respectively axis, shaft and The acceleration data of the axis, It is the acceleration due to gravity; Step D12: Perform two-stage filtering on the initial acceleration magnitude to obtain the two-stage filtered acceleration magnitude. The two-stage filtering includes an FIR bandpass filter and a Savitzky-Golay filter. The FIR bandpass filter uses a Hamming window function to filter the initial acceleration magnitude covering the pedestrian gait frequency components to obtain the FIR-filtered acceleration magnitude. The Savitzky-Golay filter uses polynomial least squares fitting within a local window to filter the FIR-filtered acceleration magnitude and obtain the two-stage filtered acceleration magnitude. Step D13: Based on the acceleration modulus after two-stage filtering, the peak detection method is used to identify the time of gait event occurrence and obtain the gait frequency. Specifically, the peak detection method is to find local maxima in the signal and filter out the true gait peaks by setting multiple physical constraints. The multiple physical constraints include minimum time interval constraint, minimum height constraint and minimum protrusion constraint. The minimum time interval constraint is used to constrain the interval between two adjacent identified peaks, the minimum height constraint is used to constrain the amplitude of the peak, and the minimum prominence constraint is used to constrain the vertical prominence between the peak and the surrounding valley. Step D2 involves calculating the stride length based on gait frequency and obtaining the calculated stride length value. The specific steps are as follows: Step D21 involves analyzing the two-stage filtered acceleration magnitude and the optimized heading angle sequence in each gait cycle. A comprehensive feature set is extracted, which includes time-domain statistical features, frequency-domain transform features, and time-frequency wavelet features. This comprehensive feature set is then concatenated and fused with the gait duration to form a high-dimensional feature vector. ; Step D22: Employ an extreme gradient boosting regression model based on high-dimensional feature vectors. The iterative correction and step-size prediction ensemble model are obtained through the following steps. Step D221: Construct the model complexity regularization term, as shown in formula (27). (27) in, This is a regularization term for model complexity. For the first The weighted scores assigned to each leaf node It is the complexity penalty coefficient that controls the splitting of leaf nodes. These are the weight coefficients of the leaf nodes; Step D222: Minimize an objective function that includes a loss function and a regularization term based on the model complexity regularization term. Specifically, assume the sample dataset contains... The nth sample, of which the nth sample The input feature vector of each sample is And the input feature vector The corresponding true step size is The extreme gradient boosting regression model, after experiencing After round of iterations, for the first The predicted value for each sample is At the same time in the The goal of each iteration in a round of iteration is to learn a new decision tree model. The specific objective function to be minimized is shown in formula (28). (28) in, For the first The objective function of the round iteration, The loss function is... Used to measure the difference between predicted and actual values. For the first The new predicted value after round of iterations, For the first In-wheel decision tree model The total number of leaf nodes; Step D223: Approximate the objective function using a second-order Taylor expansion. The optimal decision tree model is then solved using the gradient descent algorithm. Leaf weight score This leads to the formation of an integrated model for step size prediction; Step D23, convert the high-dimensional feature vector Input the step size prediction ensemble model and obtain the step size calculation value. .

6. The indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning according to claim 5, characterized in that: Step E involves performing dead reckoning based on the optimized heading angle sequence, gait frequency, and step length calculations, and obtaining the dead reckoning trajectory, as shown in formula (29). ; (29) in, and They are respectively The horizontal and vertical coordinates of dead reckoning at each moment. and They are respectively The horizontal and vertical coordinates of dead reckoning at each time point.

7. The indoor positioning method based on 5G channel characteristics and pedestrian dead reckoning according to claim 6, characterized in that: Step F involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and dead reckoning trajectory to obtain the fused location trajectory. The fused location trajectory is then smoothed and optimized to obtain the final positioning result. The specific steps are as follows: Step F1 involves using a particle filter algorithm to deeply fuse the optimized 5G location trajectory and dead reckoning trajectory to obtain the fused location trajectory. The specific steps are as follows. Step F11 establishes a unified time reference grid to align the optimized 5G position trajectories with dead reckoning trajectories at different sampling rates in time. Specifically, the optimized 5G position trajectories are aligned to the unified time grid using the nearest neighbor interpolation method with threshold constraints, and data compensation is performed when the time difference is less than a preset threshold. The dead reckoning trajectory maps the step size and heading angle information to the unified time grid and updates the displacement increment when gait events occur. Step F12: Use the initial position of the optimized 5G location trajectory as the center and generate... The initial particle set is constructed from particles that follow a Gaussian distribution. ,in For the first The initial position of each particle. For particle index, and the particle index The range of values ​​is , It follows a Gaussian distribution. For the initial 5G prediction coordinates, For particle noise variance, It is the identity matrix; Step F13: Assign equal initial weights to all particles based on the initial particle set, as shown in formula (30). (30) in, The initial weights of the particles; Step F14: When a gait event is detected, the particle state is updated using the step size and heading angle information provided by the dead reckoning trajectory, as shown in formula (31). (31) in, For the first Individual particles Location at any given moment For the first Individual particles Location at any given moment The step size for adding noise, For heading angle noise, The step-size noise variance For the heading angle noise variance, For particle indexing Update the index for dead reckoning trajectory positions with the same timestamp. For the first The optimized heading angle position; Step F15, calculate the... Individual particles The Euclidean distance between the time point and the optimized 5G location is shown in formula (32). (32) in, For the first Individual particles The Euclidean distance between the time and the optimized 5G location. for 5G location optimization at specific times; Step F16, based on the Euclidean distance between the particle and the optimized 5G position. Construct the Gaussian likelihood function and update the weights, as shown in formula (33). (33) in, For the updated particle weights, To update the particle weights, To observe noise; Step F17: The weighted average method is used to calculate the fused position trajectory, as shown in formula (34). (34) in, for Position after moment fusion; Step F2 involves smoothing and optimizing the fused position trajectory to obtain the final localization result. Specifically, a Savitzky-Golay filter is used for smoothing and optimization to obtain the final localization result.

8. An indoor positioning system based on 5G channel characteristics and pedestrian dead reckoning, wherein the specific positioning process of the indoor positioning system is based on the indoor positioning method according to any one of claims 1-7, characterized in that: The system includes a 5G positioning module, a 5G location trajectory optimization module, a heading angle calculation module, a gait step length calculation module, a dead reckoning module, and a positioning fusion module. The 5G positioning module converts the input complex 5G channel impulse response (CIR) data into a two-dimensional feature matrix, then inputs the two-dimensional feature matrix into a deep convolutional neural network for feature transformation to obtain the 5G positioning trajectory. The 5G location trajectory optimization module uses a Kalman filter to perform temporal smoothing optimization on the 5G positioning trajectory to obtain the optimized 5G location trajectory. The heading angle calculation module calculates the initial magnetic heading angle from sensor-acquired data, then optimizes the initial magnetic heading angle using an extended Kalman filter to obtain an optimized heading angle sequence. The gait step length calculation module performs gait detection based on sensor-acquired data to obtain the gait frequency, then calculates the step length based on the gait frequency to obtain the calculated step length value. The dead reckoning module performs dead reckoning based on the optimized heading angle sequence, gait frequency, and calculated step length value to obtain the dead reckoning trajectory. The positioning fusion module is used to perform deep fusion of the optimized 5G location trajectory and dead reckoning trajectory using a particle filter algorithm to obtain the fused location trajectory, and then to smooth and optimize the fused location trajectory to obtain the final positioning result.