Self-adaptive position control method for indoor positioning ranging error compensation
By adopting the adaptive particle filtering method of PSO-DNN neural network and dragonfly group intelligent algorithm in Wi-Fi FTM indoor positioning technology, the problem of large distance measurement error is solved and higher positioning accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510336803.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Among the existing Wi-Fi FTM indoor positioning technology, the distance measurement error is large, mainly due to hardware delay, multipath effect and NLOS conditions, which limits the positioning accuracy.
The distance measurement error compensation model based on PSO-DNN neural network is adopted, and the adaptive particle filtering room positioning algorithm of the Dragonfly Group Intelligent Algorithm is combined with the adaptive particle filtering room positioning algorithm. RTT data is collected through multiple APs, distance error correction and particle diversity optimization are performed, and target position coordinate information is output.
It significantly improves the accuracy of Wi-Fi FTM ranging and indoor positioning accuracy, and enhances the robustness and practicality of the positioning algorithm.
Smart Images

Figure CN119854939A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of indoor positioning technology, and in particular to an adaptive position control method for indoor positioning ranging error compensation. Background Art
[0002] Indoor positioning technology plays an important role in intelligent navigation, emergency response, and asset tracking. As a widely deployed wireless communication technology, Wi-Fi has become a hot topic in indoor positioning research due to its low cost and easy deployment. However, Wi-Fi signals are affected by multipath effects and non-line-of-sight (NLOS) propagation, resulting in large ranging errors and limiting its positioning accuracy. Wi-Fi FTM is part of the IEEE 802.11mc standard, which allows devices to directly calculate the distance between the transmitter and the receiver by measuring the round-trip time (RTT) of wireless signals. Compared with traditional Wi-Fi positioning methods, FTM technology can provide higher ranging accuracy, but its performance is affected by the signal propagation environment. Wi-Fi FTM ranging errors mainly come from the following aspects: (1) hardware delay, the time it takes for the device to process the signal will cause ranging errors; (2) multipath effects, reflections and refractions in indoor environments will complicate the signal propagation path and affect the ranging results; (3) NLOS conditions, when the signal propagation path is blocked by obstacles, significant ranging errors will occur. In order to further improve the accuracy of FTM ranging, researchers have developed various filtering and data fusion algorithms. For example, Kalman filters, particle filters, and extended Kalman filters (EKF) are used to handle noisy and inconsistent measurement data. These algorithms can effectively fuse data from multiple sensors to provide more accurate and stable positioning results.
[0003] Patent application document CN106060924A discloses an indoor positioning method based on mobile beacons, including step 1, selecting the precise position of the positioning beacon, arranging the positioning beacon, wherein the precise position is that the error of the positioning beacon density is less than 1 meter, and the position reliability of the positioning beacon is above 80; the ordinary position is that the error of the positioning beacon density is less than 3 meters, and the position reliability of the positioning beacon is below 80; step 2, accurately positioning at a position where the position reliability of the positioning beacon is 100; step 3, after leaving the precise positioning position, the position reliability gradually decays to 0, where 0 represents an accuracy of 3 meters; step 4, position correction. However, this patent cannot completely solve the existing technical problems, nor can it meet the needs of the present invention. Summary of the invention
[0004] In view of the defects in the prior art, an object of the present invention is to provide an adaptive position control method for indoor positioning and ranging error compensation.
[0005] The adaptive position control method for indoor positioning and ranging error compensation provided by the present invention includes: Step 1: Use the Wi-Fi module of the development board to initiate a precision time measurement FTM request and communicate with the access point AP according to the IEEE 802.11mc standard to measure the round-trip time RTT; record the received signal strength indicator RSSI during each FTM ranging process of the development board; Step 2: Collect RTT data from multiple APs and calculate the distance to each AP ; Step 3: Input the collected distance measurement data into the distance error compensation model based on the PSO-DNN neural network to calculate the distance error. Correction; Step 4: Pass the distance measurement data compensated by the distance error compensation model of the PSO-DNN neural network As the latest observation data, it is input into the adaptive particle filter indoor positioning algorithm based on Dragonfly; Step 5: Use the improved dragonfly swarm intelligent optimization algorithm to improve the particle diversity and rationality of particle distribution in the particle filtering process; Step 6: Weighted sum of particles in the Dragonfly-based adaptive particle filter indoor positioning algorithm to output the target location coordinates information.
[0006] Preferably, the development board is used to receive the timestamp and send timestamp Timestamp of the signal sent by the transmitter and receiving timestamp Compare and calculate the round trip time of the signal ; Where n is the number of samples and k is the sample index; Perform multiple FTM exchanges and calculate the average of these RTT values, then combine them with the speed of light Calculate the distance between the development board and each AP .
[0007] Preferably, the input layer receiving parameters of the distance error compensation model based on the PSO-DNN neural network are the actual measurement results and RSSI; the output layer provides the actual ranging error , that is, the true value of the ranging data The actual measurement results of the device in space The difference .
[0008] Preferably, a particle swarm algorithm PSO is used to find the optimal combination of neural network parameters; The particle speed update formula of the particle swarm algorithm is:
[0009] The particle position update formula of the particle swarm algorithm is: ; In the formula, For the The particle in Dimension time +1 for speed, is the inertia weight, and are cognitive and social acceleration coefficients, and is a random number uniformly distributed between 0 and 1. For the Particles in time The best position found before, For time The best position found by the front group, For the moment Time The particle in The current position of the dimension.
[0010] Preferably, the dragonfly-based adaptive particle filter indoor positioning algorithm approximates the probability distribution of the state space through a series of random samples, each sample represents the state of the system, including the position coordinates ,speed ; Use particles to represent the position of people when they move and speed , generate the initial particle set , these particles According to the initial position and speed The prior knowledge is randomly generated, and each particle Given equal weight , represents the probability of its corresponding state; The next state of the particle is predicted using a motion model that uses a constant acceleration motion model. By current location and speed and time interval to calculate; The dragonfly swarm intelligence algorithm simulates the behavior of dragonflies in nature and relies on five core behavior formulas, including: Separation: ; Alignment: ; Gather: ; Foraging: ; Avoid enemies: ; Where X represents the current position of the dragonfly individual, is the number of adjacent individuals, For the The positions of adjacent individuals, For the The speed of the neighboring individuals, The location of the food source, for the location of the predator; Introducing the observed air pressure coefficient into the dragonfly swarm intelligence algorithm ,in, is the maximum air pressure, is the average air density coefficient, variable Indicates the height from the lowest point. represents the measurement noise variance; where , Used to represent the predicted value, Represents the actual observation value and applies it to the particle filter.
[0011] Preferably, an optimal radius is selected through the optimal radius strategy , to determine whether the dragonfly individual is an isolated individual; Calculate individual With other individuals in the group The Euclidean distance between , and then all distances Sort in ascending order to form a distance sequence ; The optimal radius is selected as the median of the distance sequence D ; If the dragonfly individual is within the optimal radius If there are no other dragonflies in the body, it is considered an isolated individual; otherwise, it is a non-isolated individual.
[0012] Preferably, for isolated dragonfly individuals, the Levy flight strategy is introduced, using Update the dragonfly position, where Representing dragonfly individuals The location at the moment, is the step scale factor, is a Levy distribution The path of and is a random number between 0 and 1, is a constant, .
[0013] Preferably, for non-isolated dragonfly individuals, the dragonfly position is updated through five core behaviors: ; In the formula The weights corresponding to the five behaviors; is the coefficient of inertia; is the current iteration number.
[0014] Preferably, for the alignment behavior weight and aggregate behavior weights , introducing the observed pressure coefficient ,in , is the maximum air pressure, is the average air density coefficient, variable Indicates the height from the lowest point. represents the measurement noise variance, Used to represent the predicted value, represents the actual observed value; Align behavior weights and aggregate behavior weights Replace with and .
[0015] Preferably, based on the latest observational data To adjust the weight of the particles , weight Reflection Particles The probability that the state is consistent with the observed data; To avoid weight Degrade and maintain particle diversity, perform a resampling process, and resample according to the particle weight To select a new set of particles; the particle resampling process adopts a roulette method; By all particles Perform weighted averaging to obtain the position estimate of the moving target , weight The larger the particle, the better the estimated coordinates of the position. The greater the contribution.
[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention adopts a ranging error compensation method based on PSO-DNN (particle swarm optimization algorithm-deep neural network). This method, which combines deep learning and optimization algorithm, can effectively compensate for the errors in Wi-Fi FTM ranging data, thereby significantly improving the accuracy of ranging; (2) The present invention utilizes an adaptive particle filter positioning algorithm improved based on the dragonfly swarm intelligence algorithm. This algorithm enhances the diversity and rationality of particle distribution by simulating the behavior of dragonflies in nature, thereby improving the accuracy and robustness of the indoor positioning algorithm. (3) The algorithm and system design of the present invention take into account various factors in practical applications, such as hardware delay, multipath effect and NLOS conditions, and improve the practicality and reliability of the entire indoor positioning system through comprehensive technical means; by optimizing the parameters of the DNN neural network model through the PSO algorithm, the present invention can automatically find the optimal combination of neural network parameters, further improving the performance of the ranging error compensation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 It is a flow chart of the present invention.
[0018] Figure 2 It is the FTM protocol process diagram of the present invention.
[0019] Figure 3 It is a schematic diagram of the structure of the PSO-DNN neural network distance compensation model of the present invention.
[0020] Figure 4 This is a flow chart of the PSO-DNN neural network distance compensation model of the present invention.
[0021] Figure 5 It is a schematic diagram of the optimal radius of the present invention.
[0022] Figure 6 This is the flow chart of the improved dragonfly algorithm of the present invention. DETAILED DESCRIPTION
[0023] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0024] Embodiment 1: See also Figure 1~Figure 2 , an adaptive position control method for indoor positioning ranging error compensation, comprising the following steps: Step 1: Using the Wi-Fi module of the ESP32-S3 development board, initiate an FTM request and communicate with the access point (AP) to measure the round-trip time (RTT) according to the IEEE 802.11mc standard. Step 2: Collect through multiple APs Data and calculate the distance to each AP ; Step 3: Input the collected distance measurement data into the distance error compensation model based on the PSO-DNN neural network to calculate the distance error. Correction; Step 4: Pass the distance measurement data compensated by the PSO-DNN neural network model As the latest observation data, it is input into the adaptive particle filter indoor positioning algorithm based on Dragonfly; Step 5: Use the improved dragonfly swarm intelligent optimization algorithm to improve the particle diversity and rationality of particle distribution in the particle filtering process; Step 6: Weighted sum of particles in the Dragonfly-based adaptive particle filter indoor positioning algorithm to output the target location coordinates And other information.
[0025] Deploy more than 3 ESP32-S3 development boards as fixed access points (APs) in the corners of the target site. The target object carries a device that supports the FTM protocol as a mobile station (STA). STA is a device that initiates FTM requests to AP, and AP is a wireless network device that receives and responds to FTM requests. When STA initiates FTM request. AP decides whether to accept FTM ranging according to the protocol; once both parties agree, AP starts sending FTM messages and records the sending timestamp. ;AP waits for STA's confirmation (ACK), STA receives the ACK message and records the arrival timestamp of the FTM message Then send the STA's ACK to the AP and record the timestamp of sending the ACK ;AP receives the ACK message and records the timestamp as ; Calculate the round trip time by sending timestamp and receiving timestamp ; The AP can send multiple FTM messages, but cannot send new FTM messages before receiving the ACK from the STA. and Calculate the distance between ESP32-S3 and each AP .
[0026] This embodiment uses precise time synchronization and measurement, and FTM can achieve meter-level or even higher accuracy positioning.
[0027] Embodiment 2: See also Figure 3~Figure 4 , use the neural network model to correct the ranging error. Neural networks have strong nonlinear fitting capabilities and can theoretically fit any nonlinear relationship. The input layer of the PSO-DNN neural network model has 2 nodes. Two hidden layers are used, the first hidden layer has 64 neurons, and the second hidden layer has 32 neurons. Use the ReLU activation function to increase nonlinearity. A single output neuron is used to predict the ranging error, and no activation function is used. Choose a suitable loss function: ; epoch=10, batch size=64, training will be stopped early if the loss on the validation set does not improve for 10 consecutive epochs.
[0028] By training the neural network to learn the relationship between these inputs and outputs, the model can predict and calculate the impact of ranging errors and correct and compensate for ranging errors. The distance measurement value and signal attenuation are used as the input of the DNN error model, and the difference between the true value corresponding to the ranging data and the actual measurement value measured in space (i.e., the actual ranging error) is used as the model output. By correcting the actual ranging data of the device, the accuracy compensation of the ranging result can be achieved. The data is passed into the POS-DNN neural network distance error compensation model.
[0029] The particle swarm algorithm is used to find the optimal combination of neural network parameters. The position (parameter combination) of each particle is evaluated by running the model and calculating the performance metric. The core of the particle swarm algorithm is the update of the particle's speed and position. The following is a simplified mathematical model of the update rule: The particle speed update formula of the particle swarm algorithm is: The update formula of the and position is: In the formula, For the The particle in Dimension time +1 for speed, is the inertia weight, and are cognitive and social acceleration coefficients, and is a random number uniformly distributed between 0 and 1. For the Particles in time The best position (parameter combination) found before, For time The front group finds the best position. For the moment Time The particle in The current position of the dimension.
[0030] Embodiment 3: See also Figure 5~Figure 6 , approximates the probability distribution of the state space through a series of random samples. Each sample (particle) represents a possible state of the system, including the position coordinates ,speed etc.; Use particles to represent the position of people when they move and speed , generate the initial particle set .
[0031] These particles According to the initial position and speed Each particle is randomly generated based on the prior knowledge of Given equal weight , representing the probability of its corresponding state.
[0032] The motion model is used to predict the next state of the particle. The motion model adopts a constant acceleration motion model, and the new position of the particle You can use the current location and speed and time interval to calculate.
[0033] The prediction process also takes into account the noise in the process ; Through the improved dragonfly swarm intelligent algorithm, the particle diversity in the particle filtering process is improved, the rationality of particle distribution is enhanced, and thus the accuracy of the positioning algorithm is improved.
[0034] The dragonfly swarm intelligence algorithm simulates the behavior of dragonflies in nature and mainly relies on five core behavior formulas, including: (1) separation: ; (2) Alignment: (3) Aggregation: (4) Foraging: (5) Avoid the enemy: ; In the formula, represents the current position of the dragonfly individual, is the number of adjacent individuals, For the The positions of adjacent individuals; For the The speed of the neighboring individuals, The location of the food source, For the location of the predator.
[0035] Propose an optimal radius strategy and select an optimal radius , to determine whether the dragonfly individual (particle) is an isolated individual; calculate the individual With other individuals in the group The Euclidean distance between , and then all distances ( ) are sorted in ascending order to form a distance sequence .
[0036] The optimal radius is selected as the median of the distance sequence D ; If the dragonfly individual is within the optimal radius If there are no other dragonflies (particles) inside, it is considered an isolated individual, otherwise it is a non-isolated individual.
[0037] For isolated dragonfly individuals (particles), the Levy flight strategy is introduced, using Update the dragonfly position, where Representing dragonfly individuals The location at the moment, is the step scale factor, is a Levy distribution The path of and is a random number between 0 and 1, is a constant, .
[0038] For non-isolated dragonfly individuals (particles), the positions of dragonflies are updated through five core behaviors: ; In the formula The weights corresponding to the five behaviors; is the coefficient of inertia; is the current iteration number; for the alignment behavior weight and aggregate behavior weights , introducing the observed pressure coefficient ,in , is the maximum air pressure, usually set to 1; is the average air density coefficient, generally between 0.1 and 2.0; variable Indicates the height from the lowest point. represents the measurement noise variance. Used to represent the predicted value, represents the actual observed value.
[0039] Align behavior weights and aggregate behavior weights Replace with and .
[0040] The improved dragonfly swarm intelligent algorithm is added to the particle filtering process to improve the accuracy of the positioning algorithm; based on the latest observation data (distance measured by FTM) to adjust the weight of the particle . Weight Reflects the particles The probability that the state is consistent with the observed data.
[0041] After updating, the particle weight may change to reflect new observations. Degenerate and maintain particle diversity and perform resampling. Resampling is based on the weight of the particle. To select a new set of particles, so as to avoid a few particles dominating the entire distribution. The particle resampling process adopts the roulette method.
[0042] By all particles Perform weighted averaging to obtain the position estimate of the moving target . Weight The larger the particle, the better the estimated coordinates of the position. The greater the contribution.
[0043] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.
[0044] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. An adaptive position control method for indoor positioning and ranging error compensation, characterized in that: include: Step 1: Use the Wi-Fi module of the development board to initiate a precision time measurement FTM request and communicate with the access point AP according to the IEEE 802.11mc standard to measure the round-trip time RTT; record the received signal strength indicator RSSI during each FTM ranging process of the development board; Step 2: Collect RTT data from multiple APs and calculate the distance to each AP ; Step 3: Input the collected distance measurement data into the distance error compensation model based on the PSO-DNN neural network to calculate the distance error. Correction; Step 4: Pass the distance measurement data compensated by the distance error compensation model of the PSO-DNN neural network As the latest observation data, it is input into the adaptive particle filter indoor positioning algorithm based on Dragonfly; Step 5: Use the improved dragonfly swarm intelligent optimization algorithm to improve the particle diversity and rationality of particle distribution in the particle filtering process; Step 6: Weighted sum of particles in the Dragonfly-based adaptive particle filter indoor positioning algorithm to output the target location coordinates information.
2. The adaptive position control method for indoor positioning and ranging error compensation according to claim 1, characterized in that: Use the development board to receive the timestamp and send timestamp Timestamp of the signal sent by the transmitter and receiving timestamp Compare and calculate the round trip time of the signal ; Where n is the number of samples and k is the sample index; Perform multiple FTM exchanges and calculate the average of these RTT values, then combine them with the speed of light Calculate the distance between the development board and each AP .
3. The adaptive position control method for indoor positioning and ranging error compensation according to claim 2, characterized in that: The input layer receiving parameters of the distance error compensation model based on PSO-DNN neural network are the actual measurement results and RSSI; The output layer provides the actual ranging error , that is, the true value of the ranging data The actual measurement results of the device in space The difference .
4. The adaptive position control method for indoor positioning and ranging error compensation according to claim 3, characterized in that: The particle swarm algorithm PSO is used to find the optimal combination of neural network parameters; The particle speed update formula of the particle swarm algorithm is: The particle position update formula of the particle swarm algorithm is: ; In the formula, For the The particle in Dimension time +1 for speed, is the inertia weight, and are cognitive and social acceleration coefficients, and is a random number uniformly distributed between 0 and 1. For the Particles in time The best position found before, For time The best position found by the front group, For the moment Time The particle in The current position of the dimension.
5. The adaptive position control method for indoor positioning and ranging error compensation according to claim 4, characterized in that: The Dragonfly-based adaptive particle filter indoor positioning algorithm approximates the probability distribution of the state space through a series of random samples, each of which represents the state of the system, including the position coordinates ,speed ; Use particles to represent the position of people when they move and speed , generate the initial particle set , these particles According to the initial position and speed The prior knowledge is randomly generated, and each particle Given equal weight , represents the probability of its corresponding state; The next state of the particle is predicted using a motion model that uses a constant acceleration motion model. By current location and speed and time interval to calculate; The dragonfly swarm intelligence algorithm simulates the behavior of dragonflies in nature and relies on five core behavior formulas, including: Separation: ; Alignment: ; Gather: ; Foraging: ; Avoid enemies: ; Where X represents the current position of the dragonfly individual, is the number of adjacent individuals, For the The positions of adjacent individuals, For the The speed of the neighboring individuals, The location of the food source, for the location of the predator; Introducing the observed air pressure coefficient into the dragonfly swarm intelligence algorithm ,in, is the maximum air pressure, is the average air density coefficient, the variable Indicates the height from the lowest point. represents the measurement noise variance; where , Used to represent the predicted value, Represents the actual observation value and applies it to the particle filter.
6. The adaptive position control method for indoor positioning and ranging error compensation according to claim 5, characterized in that: Select an optimal radius through the optimal radius strategy , to determine whether the dragonfly individual is an isolated individual; Calculate individual With other individuals in the group The Euclidean distance between , and then all distances Sort in ascending order to form a distance sequence ; The optimal radius is selected as the median of the distance sequence D ; If the dragonfly individual is within the optimal radius If there are no other dragonflies in the body, it is considered an isolated individual; otherwise, it is a non-isolated individual.
7. The adaptive position control method for indoor positioning and ranging error compensation according to claim 6, characterized in that: For isolated dragonfly individuals, the Levy flight strategy is introduced, using Update the dragonfly position, where Representing dragonfly individuals The location at the moment, is the step scale factor, is a Levy distribution The path of and is a random number between 0 and 1, is a constant, .
8. The adaptive position control method for indoor positioning and ranging error compensation according to claim 7, characterized in that: For non-isolated dragonfly individuals, the dragonfly position is updated through five core behaviors: ; In the formula The weights corresponding to the five behaviors; is the coefficient of inertia; is the current iteration number.
9. The adaptive position control method for indoor positioning and ranging error compensation according to claim 8, characterized in that: For alignment behavior weights and aggregate behavior weights , introducing the observed pressure coefficient ,in , is the maximum air pressure, is the average air density coefficient, the variable Indicates the height from the lowest point. represents the measurement noise variance, Used to represent the predicted value, represents the actual observed value; Align behavior weights and aggregate behavior weights Replace with and .
10. The adaptive position control method for indoor positioning and ranging error compensation according to claim 9, characterized in that: Based on the latest observational data To adjust the weight of the particles , weight Reflection Particles The probability that the state is consistent with the observed data; To avoid weight Degrade and maintain particle diversity, perform a resampling process, and resample according to the particle weight To select a new set of particles; the particle resampling process adopts a roulette method; By all particles Perform weighted averaging to obtain the position estimate of the moving target , weight The larger the particle, the better the estimated coordinates of the position. The greater the contribution.
Citation Information
Patent Citations
Indoor positioning method based on mobile beacon
CN106060924A
Aircraft passive positioning method based on quantum dragonfly algorithm
CN114048549A
PSO-BP UWB positioning system based on improved self-adjusting particle swarm neural network
CN117479294A
Wi-Fi RTT / RSS cooperative positioning implementation method considering scene recognition
CN119071900A
Indoor positioning WIFI access point position automatic calibration method and system
CN119497225A
Cited By
Internet of Things smart phone indoor positioning method and system
CN120186750A