A geomagnetic sequence matching method
By combining particle swarm optimization and multidimensional dynamic time programming algorithms to develop a geomagnetic sequence matching method, the problem of low accuracy in indoor geomagnetic positioning was solved, achieving efficient and reliable navigation services and improving the accuracy and robustness of geomagnetic positioning.
Patent Information
- Application Number
- CN202411447279.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-10-16
AI Technical Summary
In indoor environments, existing geomagnetic positioning technology is affected by obstacles, resulting in low positioning accuracy. Furthermore, traditional methods suffer from problems such as high computational load, complex hardware deployment, and difficult maintenance.
A combination of particle swarm optimization (PSO) and multidimensional dynamic time programming (MRT) algorithms is employed. By matching geomagnetic sequences, an initial particle swarm is generated using PSO, and geomagnetic data is matched using simulated annealing to optimize particle position and velocity. Adaptive inertial weights and the Metropolis criterion are introduced to further optimize the geomagnetic sequence matching process.
It improves the accuracy and robustness of geomagnetic positioning, shortens the computation time, ensures efficient and reliable navigation services in complex environments, avoids premature convergence to local optima, and meets the needs of modern navigation systems for fast response and efficient computation.
Smart Images

Figure CN119474898B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of geomagnetic positioning, and in particular to a geomagnetic sequence matching method based on particle swarm optimization and multidimensional dynamic time programming algorithm. Background Technology
[0002] With the acceleration of urbanization, the demand for high-precision positioning services is increasing. In outdoor environments, technologies such as the BeiDou Navigation Satellite System can achieve high-precision, real-time positioning. However, in indoor environments such as large shopping malls and office buildings, GPS positioning accuracy is easily affected by factors such as building obstructions, failing to meet the requirements of many practical applications. Currently, WiFi and Bluetooth are widely used. However, due to the numerous obstacles in indoor environments, radio waves attenuate during transmission, affecting the accuracy of the received signal. Furthermore, these methods also suffer from the need for specific equipment, additional hardware, and regular maintenance.
[0003] Geomagnetic positioning determines the real-time location of a moving vehicle by measuring its geomagnetic field data and matching it with a pre-made geomagnetic map. Because the geomagnetic field is extremely stable—unless ferromagnetic materials are added—it does not rely on external signals, requires no additional hardware deployment, and is suitable for complex environments such as urban canyons and indoor spaces. It is also low-cost and easy to maintain. Furthermore, geomagnetic positioning offers advantages such as high accuracy and strong anti-interference capabilities, providing stable and reliable navigation services for aircraft, vehicles, and other similar applications. Summary of the Invention
[0004] Therefore, the purpose of this invention is to provide a geomagnetic sequence matching method that can find the optimal alignment path of two sequences in the time dimension using particle swarm optimization and simulated annealing algorithms without increasing the computational load, thereby improving matching accuracy and shortening computation time.
[0005] To achieve the aforementioned objectives, the technical solution adopted is as follows:
[0006] A geomagnetic sequence matching method includes the following steps:
[0007] S1. First, the geomagnetic reference map is cropped to obtain the geomagnetic sequence library. When the geomagnetic positioning system receives a positioning request, it receives the current geomagnetic data and uses it as the target sequence to be matched. The particle swarm algorithm is used to generate an initial particle swarm, and the starting position and velocity of each particle are randomly initialized, and the relevant initialization parameters are set.
[0008] S2. The similarity of geomagnetic sequences is calculated using the multidimensional DTW algorithm and set as the objective function. A distance matrix is constructed based on five-dimensional features. The shortest path is searched to measure the similarity and is used as the evaluation criterion for the PSO-SA algorithm. The effectiveness of particles is judged by the first single-point geomagnetic Euclidean distance. The initial population fitness is calculated. The minimum DTW value is selected as the global optimal position. Individuals and the global optimal position are initialized.
[0009] S3. Update the position and velocity of the particles based on the historical best fitness value of the population and the adaptive inertia weight, calculate the updated fitness value of the population, and retain it as the direction for subsequent updates. If the population generates better individuals during the iteration, then update it.
[0010] S4. Calculate the probability of each particle accepting the new solution at the current temperature using the Metropolis criterion. If the new solution is better than the current solution, accept the new solution; otherwise, accept the new solution using the Metropolis criterion. Then, as the temperature decreases, update the cooling coefficient and use roulette wheel to redetermine the global optimal solution. Continuously optimize the particle swarm during the iteration.
[0011] S5. Determine the velocity and position of the particle after the current iteration. If the particle velocity exceeds the velocity range, take the particle velocity as the boundary of the velocity range and judge the particle position. If the particle position exceeds the position range, mark the particle as invalid.
[0012] S6. Based on the optimal solution, the particle position is updated again using the selection operation. The particle is then updated again through the selection operation and optimized. The position is compared with the historical best fit of each particle. If the position is lower than the historical best fit, the updated particle position is used instead of the historical best fit. Otherwise, the position is left unchanged.
[0013] S7. Determine the iteration termination condition: if the maximum number of iterations is reached or the absolute error of the minimum fitness value between two consecutive iterations is less than the DTW distance threshold and the number of iterations continues to be greater than the distance threshold, terminate the iteration; otherwise, return to step S3 for iteration.
[0014] S8. The iteration stops, and the optimal solution, i.e., the user's final coordinates, is obtained.
[0015] As a further improvement of the present invention, step S1 specifically includes the following steps:
[0016] S1-1. A geomagnetic reference map is created using Kriging interpolation. The map is then divided into sequences using a sliding window, with a window length of a1 (a positive integer). This yields a geomagnetic database MagArray = {Q1, Q2, Q3, ..., Q...}. l}, and use the coordinates corresponding to the last geomagnetic field in the sequence as the location label for that segment of the sequence;
[0017] S1-2, within the range of the geomagnetic fingerprint map, i.e. (B) min B max N particles are randomly generated within the array, with the first geomagnetic point of the geomagnetic sequence as the particle. After initialization, the initial position of the particle is x. i and velocity v i Set the initial temperature T and the cooling coefficient β.
[0018] As a further improvement of the present invention, step S2 specifically includes the following steps:
[0019] S2-1. Use the multidimensional DTW algorithm to calculate the similarity of geomagnetic sequences: The calculation process is mainly divided into two steps. First, calculate the distance between the multidimensional features of each element in the two geomagnetic sequences to form a distance matrix. Second, after calculating the distance matrix of the two geomagnetic sequences, start from position (1,1) of the distance matrix and end at position (n,q) to find the path with the shortest cumulative distance.
[0020] S2-2. Use the first single-point geomagnetic field of the geomagnetic sequence to be located to determine the validity of the particle: Perform Euclidean distance judgment between the first point in the geomagnetic sequence found by the particle and the first point in the geomagnetic sequence to be located. If the obtained value is greater than the threshold α1, mark it as invalid.
[0021] S2-3, via fitness(x) i )=-f(x i The function ) = -D(n,q) calculates the fitness values of the initial population, compares them, and selects the individual with the smallest fitness value as the optimal individual, i.e., p. besti .
[0022] As a further improvement of the present invention, step S3 specifically includes the following steps:
[0023] S3-1. Adaptively update the inertia weights by combining the temperature and DTW distance from the simulated annealing algorithm, using the formula... Adaptive velocity updates are performed on particles in the particle swarm, and x is used. i (t+1)=x i (t)+v i (t+1) Update the particle position;
[0024] S3-2. Evaluate the current position of each particle and calculate its fitness value. If the fitness value of the particle's current position is better than the fitness value of its individual best position, then update the individual best position. If the fitness value of the particle's individual best position is better than the fitness value of the current global best position, then update the global best position.
[0025] As a further improvement of the present invention, step S4 specifically includes the following steps:
[0026] S4-1. Using the Metropolis sampling criterion as the basis for individual optimal selection, the current fitness value of a particle is compared with its historical fitness value. The current value is higher than the historical fitness value. besti If a better approach is taken, then the current value is set to p. besti The current value is inferior to p. besti At this point, the probability is calculated using the Metropolis criterion formula, and the final decision on whether to accept the current value p is based on the probability value of the particle in its current generation. besti ;
[0027] S4-2. Compare the fitness value of the current particle with the global optimal solution g. best If the current particle fitness value is better than g best Then update g best This is the current particle fitness value; otherwise, it is not updated.
[0028] S4-3. If the current state has not yet reached the cooling state, continue to cool down, let T = T × β, and go to step S4-1 until the annealing operation is completed;
[0029] S4-4. Use the roulette wheel method to redetermine the global optimal solution and continuously optimize the particle swarm during iteration.
[0030] As a further improvement of the present invention, step S5 specifically includes the following steps:
[0031] S5-1. Determine the particle swarm update velocity for the current iteration number and perform a velocity out-of-bounds operation, i.e., if the particle velocity exceeds the velocity range (v... min ,v max If the particle velocity is taken as the boundary of the velocity interval, then the particle velocity will be used as the boundary of the velocity interval.
[0032] S5-2. Check if the particle position exceeds the position range. If the particle exceeds the position range, mark the particle as invalid. Otherwise, keep the particle and continue updating.
[0033] The beneficial effects of this invention are:
[0034] 1. This invention significantly improves the accuracy and robustness of geomagnetic positioning systems by combining particle swarm optimization (PSO) with dynamic time warping (DTW). Traditional geomagnetic positioning may introduce errors due to subtle changes in the environmental magnetic field. However, this invention effectively overcomes these challenges through intelligent search using PSO and flexible matching using DTW, ensuring more accurate and reliable positioning results and providing users with higher-quality navigation services.
[0035] 2. This invention innovatively integrates simulated annealing probability criteria and multidimensional dynamic time programming algorithm into inertial weights, generating an adaptively updated inertial weight formula, which effectively improves the accuracy and robustness of geomagnetic sequence matching and positioning. By finely controlling particle motion trajectories, the optimal matching area is quickly locked, significantly shortening the positioning time. Simultaneously, the global and individual optimal solutions are updated in real time, ensuring the algorithm continuously converges towards the optimal direction, providing an efficient and reliable solution for precise navigation and positioning in complex environments.
[0036] 3. This invention innovatively integrates the global search and local optima-avoidance mechanisms of the simulated annealing algorithm. By leveraging the simulated annealing algorithm's strategy of probabilistically accepting inferior solutions, it enhances the global exploration capability of the particle swarm optimization (PSO) algorithm, effectively preventing premature convergence to local optima. Simultaneously, the fine-grained search advantage of the PSO algorithm improves the algorithm's convergence speed and optimization accuracy. This fusion mechanism enables the algorithm to efficiently and accurately find the global optimum in a broad solution space, resulting in more stable and efficient positioning results, meeting the demands of modern navigation systems for rapid response and efficient computation. Attached Figure Description
[0037] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0038] Figure 1 This is a schematic diagram of the geomagnetic sequence matching method of the present invention;
[0039] Figure 2 This is a schematic diagram of the overall geomagnetic positioning system. Detailed Implementation
[0040] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0041] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0042] like Figure 1 As shown, a geomagnetic sequence matching method for indoor positioning includes the following steps:
[0043] S1. First, the geomagnetic reference map is cropped to obtain the geomagnetic sequence library. When the geomagnetic positioning system receives a positioning request, it receives the current geomagnetic data and uses it as the target sequence to be matched. The particle swarm algorithm is used to generate an initial particle swarm, and the starting position and velocity of each particle are randomly initialized, and the relevant initialization parameters are set.
[0044] Step S1 specifically includes the following steps:
[0045] S1-1. A geomagnetic reference map is created using Kriging interpolation. The map is then divided into sequences using a sliding window, with a window length of a1 (a positive integer). This yields a geomagnetic database MagArray = {Q1, Q2, Q3, ..., Q...}. l}, and use the coordinates corresponding to the last geomagnetic field in the sequence as the location label for that segment of the sequence;
[0046] S1-2, within the range of the geomagnetic fingerprint map, i.e. (B) min B max N particles are randomly generated within the array, with the first geomagnetic point of the geomagnetic sequence as the particle. After initialization, the initial position of the particle is x. i and velocity v i Let the initial temperature T and the cooling coefficient β be set, and the formula is as follows:
[0047] x i (0)=x min +(x max -x min rand (1)
[0048] v i (0)=v min +(v max -v min)·rand (2)S2、Use the multidimensional DTW algorithm to calculate the similarity of geomagnetic sequences and set it as the objective function. Construct a distance matrix based on five-dimensional features, find the shortest path to measure the similarity, and use it as the evaluation standard of PSO-SA algorithm. Judge the effectiveness of particles by the first single-point geomagnetic Euclidean distance, calculate the initial population fitness, select the minimum DTW value as the global optimal position, and initialize the individual and the global optimal position.
[0049] Step S2 specifically includes the following steps:
[0050] S2-1 uses a multidimensional DTW algorithm to calculate the similarity of geomagnetic sequences. The first step is to use the multidimensional DTW algorithm to calculate the similarity of the geomagnetic sequences, which is then used as the criterion for evaluating particle effects. The calculation formula is as follows:
[0051]
[0052] Where d(i,j) is the distance between the i-th element of the test sequence and the j-th element of the matching sequence in the geomagnetic database, n is the length of the test sequence, q is the length of the matching sequence in the geomagnetic database, and s is the feature dimension of each element in the geomagnetic sequence.
[0053] The second step is to calculate the distance matrix between the two geomagnetic sequences. Starting from position (1,1) in the distance matrix and ending at position (n,q), find the path with the shortest cumulative distance. The formula for calculating the cumulative distance of the path is:
[0054] D(i,j)=d(i,j)+min{D(i-1,j),D(i-1,j-1),D(i,j-1)} (4)
[0055] Ultimately, D(n,q) represents the cumulative distance between two geomagnetic sequences. The smaller the value of D(n,q), the higher the similarity between the two geomagnetic sequences. In the particle swarm optimization algorithm, fitness is represented by the negative value of DTW, i.e., fitness(x) = ... i )=-f(x i ) = -D(n,q), where DTW distance is calculated after each iteration, and the minimum DTW value is taken as the global optimal position g. best Each particle's individual optimal position is initialized to its initial position, and the global optimal position is initialized to the individual optimal position with the best fitness value among all particles.
[0056] S2-2. Use the first single-point geomagnetic field of the geomagnetic sequence to be located to determine the validity of the particle. Calculate the Euclidean distance between the first point in the geomagnetic sequence found by the particle and the first point in the geomagnetic sequence to be located. If the result is greater than the threshold α1, mark it as invalid. The formula for checking particle validity is:
[0057]
[0058] S2-3, via fitness(x) i )=-f(x i The function ) = -D(n,q) calculates the fitness values of the initial population, compares them, and selects the individual with the smallest fitness value as the optimal individual, i.e., p. besti .
[0059] S3. Update the position and velocity of the particles based on the historical best fitness value of the population and the adaptive inertia weight, calculate the updated fitness value of the population, and retain it as the direction for subsequent updates. If the population generates better individuals during the iteration, then update it.
[0060] Step S3 specifically includes the following steps:
[0061] S3-1. Particle velocity update consists of three main parts: inertial component, individual optimal position component, and global optimal position component. Combining the simulated annealing probability criterion and the matching quality between the current particle and the reference sequence, an adaptive inertial weighting formula is designed to update the particle velocity and position. The formula is as follows:
[0062]
[0063] In the formula, ν i (t) is the velocity of particle i in the t-th iteration; x i (t) is the position of particle i in the t-th iteration; ω(i) is the inertia weight of the population in the t-th iteration; ω0 represents the initial inertia weight; D(n,q) inorm T is the DTW distance of particle i at the t-th iteration; inorm c1 is the temperature of particle i at the t-th iteration; c2 is the individual learning factor; c2 is the social learning factor; r1 and r2 are random numbers between [0,1]; p besti It is the individual optimal position of particle i at the t-th iteration; g best It is the globally optimal position of the particle at the t-th iteration; x i (t) is the position of the particle in the t-th iteration.
[0064] S3-2. Evaluate the current position of each particle and calculate its fitness value. If the fitness value of a particle's current position is better than the fitness value of its individual best position, then update the individual best position. If the fitness value of a particle's individual best position is better than the fitness value of its current global best position, then update the global best position. The formulas for updating the individual and global best positions are:
[0065]
[0066] S4. Calculate the probability of each particle accepting the new solution at the current temperature using the Metropolis criterion. If the new solution is better than the current solution, accept the new solution; otherwise, accept the new solution using the Metropolis criterion. Then, as the temperature decreases, update the cooling coefficient and use roulette wheel to redetermine the global optimal solution. Continuously optimize the particle swarm during the iteration.
[0067] Step S4 specifically includes the following steps:
[0068] S4-1. Using the Metropolis sampling criterion as the basis for individual optimal selection, the current fitness value of a particle is compared with its historical fitness value. The current value is higher than the historical fitness value. besti If a better approach is taken, then the current value is set to p. besti The current value is inferior to p. besti At this point, the probability is calculated using the Metropolis criterion formula, and the final decision on whether to accept the current value p is based on the probability value of the particle in its current generation. besti The Metropolis criterion formula is:
[0069]
[0070] S4-2. Compare the fitness value of the current particle with the global optimal solution g. best If the current particle fitness value is better than g best Then update g best This is the current particle fitness value; otherwise, it is not updated.
[0071] S4-3. If the current state has not yet reached the cooling state, continue to cool down, let T = T × β, and go to step S4-1 until the annealing operation is completed;
[0072] S4-4. The fitness (x) of the individual calculated above. i ), calculate the probability of each individual being selected (fitness(x)). i The swarm contains N individuals with fitness values f(x1), f(x2), ..., f(x3). N The selection probability p of particle i i for
[0073]
[0074] Calculate the cumulative probability for each individual, then generate a random number r within a range, if p i-1 <r<p i If individual i is selected as an individual in the next generation of the population, the fitness value and optimal fitness value of the swarm selected by roulette wheel are calculated, and the cumulative probability is calculated using the following formula:
[0075]
[0076] S5. Determine the velocity and position of the particle after the current iteration. If the particle velocity exceeds the velocity range, take the particle velocity as the boundary of the velocity range and judge the particle position. If the particle position exceeds the position range, mark the particle as invalid.
[0077] Step S5 specifically includes the following steps:
[0078] S5-1. Determine the particle swarm update velocity for the current iteration number according to formula (6), and perform a velocity out-of-bounds operation, i.e., if the particle velocity exceeds the velocity range (v min ,v max If the particle velocity is taken as the boundary of the velocity interval, then the particle velocity will be used as the boundary of the velocity interval.
[0079] S5-2. Check if the particle position exceeds the position range. If the particle exceeds the position range, mark the particle as invalid. Otherwise, keep the particle and continue updating.
[0080] S6. Based on the optimal solution, the particle position is updated again using the selection operation. The particle is then updated again through the selection operation and optimized. The position is compared with the historical best fit of each particle. If the position is lower than the historical best fit, the updated particle position is used instead of the historical best fit. Otherwise, the position is left unchanged.
[0081] S7. Determine the iteration termination condition: if the maximum number of iterations is reached or the absolute error of the minimum fitness value between two consecutive iterations is less than the DTW distance threshold and the number of iterations continues to be greater than the distance threshold, terminate the iteration; otherwise, return to step S3 for iteration.
[0082] S8. The iteration stops, and the optimal solution, i.e., the user's final coordinates, is obtained.
[0083] This invention utilizes geomagnetic reference maps to construct a sequence library, combines particle swarm optimization (PSO) with multidimensional dynamic time programming to evaluate the similarity of geomagnetic data in real time, and introduces the Meltrof criterion and roulette wheel optimization search to improve particle accuracy. By adaptively adjusting particle parameters, the matching positions are iteratively optimized until convergence, thus obtaining precise positioning coordinates. This invention ensures real-time geomagnetic positioning while improving accuracy and robustness, and avoids the drawback of multidimensional dynamic time programming algorithms, which suffer from high computational complexity and are difficult to run efficiently on large-scale geomagnetic datasets when used alone.
[0084] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, component splitting or combination, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A geomagnetic sequence matching method, characterized in that, Includes the following steps: S1. First, the geomagnetic reference map is cropped to obtain the geomagnetic sequence library. When the geomagnetic positioning system receives a positioning request, it receives the current geomagnetic data and uses it as the target sequence to be matched. The particle swarm algorithm is used to generate an initial particle swarm, and the starting position and velocity of each particle are randomly initialized, and the relevant initialization parameters are set. S2. The similarity of geomagnetic sequences is calculated using the multidimensional DTW algorithm and set as the objective function. A distance matrix is constructed based on five-dimensional features. The shortest path is searched to measure the similarity and is used as the evaluation criterion for the PSO-SA algorithm. The effectiveness of particles is judged by the first single-point geomagnetic Euclidean distance. The initial population fitness is calculated. The minimum DTW value is selected as the global optimal position. Individuals and the global optimal position are initialized. S3. Update the position and velocity of the particles based on the historical best fitness value of the population and the adaptive inertia weight, calculate the updated fitness value of the population, and retain it as the direction for subsequent updates. If the population generates better individuals during the iteration, then update it. S4. Calculate the probability of each particle accepting the new solution at the current temperature using the Metropolis criterion. If the new solution is better than the current solution, accept the new solution; otherwise, accept the new solution using the Metropolis criterion. Then, as the temperature decreases, update the cooling coefficient and use roulette wheel to redetermine the global optimal solution. Continuously optimize the particle swarm during the iteration. S5. Determine the velocity and position of the particle after the current iteration. If the particle velocity exceeds the velocity range, take the particle velocity as the boundary of the velocity range and judge the particle position. If the particle position exceeds the position range, mark the particle as invalid. S6. Based on the optimal solution, the particle position is updated again using the selection operation. The particle is then updated again through the selection operation and optimized. The position is compared with the historical best fit of each particle. If the position is lower than the historical best fit, the updated particle position is used instead of the historical best fit. Otherwise, the position is left unchanged. S7. Determine the iteration termination condition: if the maximum number of iterations is reached or the absolute error of the minimum fitness value between two consecutive iterations is less than the DTW distance threshold and the number of iterations continues to be greater than the distance threshold, terminate the iteration; otherwise, return to step S3 for iteration. S8. The iteration stops, and the optimal solution, i.e., the user's final coordinates, is obtained.
2. The geomagnetic sequence matching method according to claim 1, characterized in that: Step S1 specifically includes the following steps: S1-1. A geomagnetic reference map is created using Kriging interpolation. The map is then divided into sequences using a sliding window, with a window length of a1 (a positive integer). This yields a geomagnetic database MagArray = {Q1, Q2, Q3, ..., Q...}. l }, and use the coordinates corresponding to the last geomagnetic field in the sequence as the location label for that segment of the sequence; S1-2, within the range of the geomagnetic fingerprint map, i.e. (B) min B max N particles are randomly generated within the array, with the first geomagnetic point of the geomagnetic sequence as the particle. After initialization, the initial position of the particle is x. i and velocity v i Set the initial temperature T and the cooling coefficient β.
3. The geomagnetic sequence matching method according to claim 1, characterized in that, Step S2 specifically includes the following steps: S2-1. Use the multidimensional DTW algorithm to calculate the similarity of geomagnetic sequences: The calculation process includes the following two steps. First, calculate the distance between the multidimensional features of each element in the two geomagnetic sequences to form a distance matrix. Second, after calculating the distance matrix of the two geomagnetic sequences, start from position (1,1) of the distance matrix and end at position (n,q) to find the path with the shortest cumulative distance. S2-2. Use the first single-point geomagnetic field of the geomagnetic sequence to be located to determine the validity of the particle: Perform Euclidean distance judgment between the first point in the geomagnetic sequence found by the particle and the first point in the geomagnetic sequence to be located. If the obtained value is greater than the threshold α1, mark it as invalid. S2-3, via fitness(x) i )=-f(x i The function ) = -D(n,q) calculates the fitness values of the initial population, compares them, and selects the individual with the smallest fitness value as the optimal individual, i.e., p. besti .
4. The geomagnetic sequence matching method according to claim 1, characterized in that, Step S3 specifically includes the following steps: S3-1. Adaptively update the inertia weights by combining the temperature and DTW distance from the simulated annealing algorithm, using the formula... Adaptive velocity updates are performed on particles in the particle swarm, and x is used. i (t+1)=x i (t)+v i (t+1) Update the particle position; S3-2. Evaluate the current position of each particle and calculate its fitness value. If the fitness value of the particle's current position is better than the fitness value of its individual best position, then update the individual best position. If the fitness value of the particle's individual best position is better than the fitness value of the current global best position, then update the global best position.
5. The geomagnetic sequence matching method according to claim 1, characterized in that, Step S4 specifically includes the following steps: S4-1. Using the Metropolis sampling criterion as the basis for individual optimal selection, the current fitness value of a particle is compared with its historical fitness value. The current value is higher than the historical fitness value. besti If a better approach is taken, then the current value is set to p. besti ; The current value is inferior to p besti At this point, the probability is calculated using the Metropolis criterion formula, and the final decision on whether to accept the current value p is based on the probability value of the particle in its current generation. besti ; S4-2. Compare the fitness value of the current particle with the global optimal solution g. best If the current particle fitness value is better than g best Then update g best This is the current particle fitness value; otherwise, it is not updated. S4-3. If the current state has not yet reached the cooling state, continue to cool down, let T = T × β, and go to step S4-1 until the annealing operation is completed; S4-4. Use the roulette wheel method to redetermine the global optimal solution and continuously optimize the particle swarm during iteration.
6. The geomagnetic sequence matching method according to claim 1, characterized in that, Step S5 specifically includes the following steps: S5-1. Determine the particle swarm update velocity for the current iteration number and perform a velocity out-of-bounds operation, i.e., if the particle velocity exceeds the velocity range (v... min ,v max If the particle velocity is taken as the boundary of the velocity interval, then the particle velocity will be used as the boundary of the velocity interval. S5-2. Check if the particle position exceeds the position range. If the particle exceeds the position range, mark the particle as invalid. Otherwise, keep the particle and continue updating.
Citation Information
Patent Citations
Geomagnetic matching navigation method for geomagnetic-strapdown inertial navigation integrated navigation system
CN102322858A
Indoor positioning method based on particle filtering algorithm
CN108632761A