A target positioning method based on a particle swarm optimization algorithm
By combining differential evolution and simulated annealing algorithms to optimize the particle swarm optimization algorithm, the problems of insufficient positioning accuracy and stability in target localization of the particle swarm optimization algorithm are solved, and high-precision, high-stability and fast target localization results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF SCI & TECH
- Filing Date
- 2024-03-13
- Publication Date
- 2026-06-12
AI Technical Summary
Existing particle swarm optimization algorithms suffer from insufficient accuracy and stability in target localization, especially in the case of local optima, which makes it difficult to escape, resulting in inaccurate and unstable localization.
The particle swarm optimization algorithm is optimized by combining differential evolution and simulated annealing algorithms. By constructing a fitness function, using adaptive design of inertial weights and the Metropolis criterion, and combining exponential function and beta random number design to design inertial weight changes, particles are updated and selected, avoiding local optima and improving positioning accuracy and stability.
It achieves high-precision, high-stability, and fast target localization with a positioning error of less than 0.5m. Its stability is better than other algorithms, and its convergence speed is fast, effectively avoiding getting trapped in local optima.
Smart Images

Figure CN118171681B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to target localization technology, specifically relating to a target localization method based on particle swarm optimization algorithm. Background Technology
[0002] Sensor positioning is widely used in industry, military, and our daily lives. Examples include industrial robot positioning, wireless sensor networks, drones, and loitering munition swarms. Currently, the positioning capabilities of existing single nodes are insufficient. Most positioning methods utilize trilateration or angle positioning, employing multiple low-cost sensors to measure the distance and angle parameters of an unknown target. However, these methods cannot be applied to high-precision positioning applications and still suffer from poor positioning stability.
[0003] With the increasing maturity of swarm intelligence algorithms, their applications in fields such as path planning are becoming more diverse. Utilizing swarm intelligence algorithms to achieve accurate, stable, and rapid target localization will become an important method. Swarm intelligence localization algorithms enable a single node to obtain the optimal position estimate of a target even with data containing certain errors, through single-target optimization.
[0004] Particle swarm optimization (PSO) is a typical algorithm in swarm intelligence. It finds the optimal solution by mimicking the swarming behavior of flocks of birds and schools of fish, thus bringing the objective function to convergence. However, in some cases, particle swarms cannot explore the entire region every time. Due to their speed, these particles may jump back and forth around local optima without escaping this limitation, thus getting trapped in local optima.
[0005] Currently, in research on the application of particle swarm optimization (PSO) for localization, most scholars combine it with a second optimization algorithm to address the occurrence of local optima. To prevent particles from getting trapped in local optima, Zhang et al. proposed a refined hybrid PSO algorithm, which incorporates bacterial foraging optimization operations for robot swarm localization (Zhang, Y.; Zhang, J.; Hao, G.; Zhang, W. Localizing odor source with multi-robot based on hybridparticle swarm optimization. In Proceedings of the 2015 11th International Conference on Natural Computation (ICNC). IEEE, 2015, pp. 902–906.). Optimizing PSO by combining it with a single algorithm or method can solve local optima problems to a certain extent, but localization accuracy and stability can still be further improved. Summary of the Invention
[0006] The purpose of this invention is to provide a target localization method based on particle swarm optimization algorithm, and to design a localization method with high positioning accuracy, high positioning stability and fast convergence.
[0007] The technical solution to achieve the purpose of this invention is: a target localization method based on particle swarm optimization algorithm, the steps of which are as follows:
[0008] Step 1: Using the laser sensor as a node, collect information from the target to obtain the distance information from the node to the target; convert the latitude and longitude information to obtain the node position information in the three-dimensional coordinate system; use the distance information and node position information as input, and proceed to Step 2.
[0009] Step 2: Construct the fitness function in the particle swarm optimization localization algorithm, and proceed to Step 3.
[0010] The parameters of the fitness function include the target position, the node's own position, and the distance information from the node to the target.
[0011] Step 3: Initialize the parameters of the particle swarm optimization localization algorithm and randomly generate the velocity and position of the particles, then proceed to Step 4.
[0012] Step 4: Calculate the individual extreme value and the population extreme value of the particle based on the fitness function. The population extreme value is the solution for the current target position. Determine whether the solution for the target position meets the positioning error requirement. If it does not meet the requirement, proceed to step 5. If it does meet the requirement, output the currently obtained target position.
[0013] Step 5: Combining the differential evolution algorithm, first perform a mutation operation on the particle to obtain an intermediate particle, and then cross it with the current particle in different dimensions to obtain a new particle, and proceed to step 6.
[0014] Step 6: Using the simulated annealing algorithm, determine whether to select the new particle generated in step 5 as the final particle according to the Metropolis criterion. If the new particle generated in step 5 is selected as the final particle, proceed to step 7; otherwise, the particle remains unchanged, the current particle is selected as the final particle, and proceed to step 7.
[0015] Step 7: Adaptively design the inertia weight in the particle velocity update formula so that the inertia weight ω is greater than 0.7 in the early stage of iteration. As the number of iterations increases, the inertia weight ω gradually decreases. Perform boundary judgment on the velocity and position of the final particle generated in Step 6. If the condition is met, keep it unchanged; otherwise, make corrections and proceed to Step 4.
[0016] Compared with the prior art, the significant advantages of this invention are:
[0017] (1) This invention combines the mutation and crossover of the differential evolution algorithm to update particles, ensuring the randomness and diversity of particles, and fully exploring the solution space during the iteration process.
[0018] (2) The present invention uses the Metropolis criterion of the annealing algorithm to select particles that have undergone mutation and crossover, and uses the probability jump characteristic to avoid the occurrence of local optimal solutions in the early stage of iteration.
[0019] (3) The present invention uses an exponential function and beta random number to design the inertia weight change formula and uses adaptive inertia weight to update particle velocity information, which ensures that the particle fully explores the region in the early stage of iteration and improves the effect of the optimal solution in the later stage of iteration. Attached Figure Description
[0020] Figure 1 This is a flowchart of the target localization method based on particle swarm optimization algorithm of the present invention.
[0021] Figure 2 This is a comparison chart of the positioning error of this invention with other algorithms.
[0022] Figure 3 This is a comparison chart of the convergence speed of this invention with other algorithms. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, and the simulation results of the present invention will be analyzed. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0024] The following section will further introduce the specific implementation method, the technical difficulties and inventive points of this invention, and the simulation effect of the design method in this paper, using this design example as an example.
[0025] Combination Figure 1 A target localization method based on particle swarm optimization algorithm is described below:
[0026] Step 1: Use the laser sensor as a node to collect information from the target and obtain the distance information from the node to the target; convert the latitude and longitude information to obtain the node position information in the three-dimensional coordinate system; use the distance information and node position information as input.
[0027] Step 2: Construct the fitness function for the particle swarm optimization localization algorithm.
[0028] The parameters of the fitness function include the target position, the node's own position, and the distance from the node to the target; assuming that the position coordinates of each node are (x... i y i , z i The target coordinates are (x, y, z). In the particle swarm optimization localization algorithm, i is the i-th particle, n is the total number of particles, and the distance d from the node to the target is combined with the distance information d. i The fitness function f(x, y, z) is as follows:
[0029]
[0030] Ideally, the target position (x, y, z) should make the fitness function f(x, y, z) = 0, that is, minimize f(x, y, z). Considering the positioning error, it is impossible for there to be (x, y, z) such that f(x, y, z) = 0. However, when f(x, y, z) is minimized, the positioning coordinates at this time are the optimal solution for positioning.
[0031] This invention is the first to utilize information from multiple nodes to construct a fitness function, thereby achieving target localization.
[0032] In this way, the problem of defining the target is transformed into the problem of optimizing and finding the minimum value.
[0033] Step 3: Initialize the various parameters in the algorithm, including: number of particles, particle dimension, maximum number of iterations, velocity boundary, position boundary, learning factor, initial temperature, cooling coefficient, crossover probability, mutation factor, weight extrema, and weight random correction factor.
[0034] Step 4: Calculate the individual extreme value and the population extreme value of the particle based on the fitness function. The population extreme value is the solution for the current target position. Determine whether the solution for the target position meets the positioning error requirement. If it does not meet the requirement, proceed to step 5. If it does meet the requirement, output the currently obtained target position.
[0035] Step 5: Combining the differential evolution algorithm, first, the particles are mutated to obtain intermediate particles. Then, these intermediate particles are crossed with the current particles in different dimensions to obtain new particles. Specifically, this includes:
[0036] Step 5.1, mutation, is used to generate new solution vectors to enrich the search space and help the algorithm escape local optima:
[0037] By randomly selecting some existing solution vectors and linearly combining them, a mutation vector is generated, as shown in the equation:
[0038] h i (g+1)=x r1 (g)+F(x r2 (g)-xr3 (g))
[0039] In the formula h i (g+1) is an intermediate particle obtained through mutation, where r1, r2, and r3 are particles randomly selected from the population, and satisfy r1≠r2≠r3≠i; (x r2 -x r3 ) represents the differential vector of the two particle positions, which is the key to the differential evolution algorithm; F is the mutation factor;
[0040] To improve the convergence speed, make x r1 By taking the globally optimal solution and drawing on the information of the best individual in the population, the convergence speed is greatly accelerated.
[0041] Step 5.2, Crossover, used to randomly select the mother vector needed for mutation:
[0042]
[0043] Where CR is the crossover probability, representing individuals randomly selected for crossover based on probability; x i,j U represents the j-th dimension of the i-th particle. i,j (g+1) represents the j-th dimension of the new particle, h i,j Let represent the j-th dimension of the intermediate particle, g represent the iteration number, and rand represent a random number between 0 and 1.
[0044] Step 6: Combining the simulated annealing algorithm, determine whether to select the new particle generated in Step 5 as the final particle according to the Metropolis criterion; otherwise, the particle remains unchanged. Specifically, this includes:
[0045] Step 6.1: Use the Metropolis criterion to determine whether to select a new particle:
[0046] Let f(g) be the fitness of a particle in generation g, and f(g+1) be the fitness of the particle in generation g+1. If f(g+1) < f(g), meaning the particle in generation g+1 is better than the particle in generation g, then the particle will be transferred 100%. Otherwise, the probability setting in the following formula is used to determine whether to accept the inferior state:
[0047]
[0048] In the formula, P is a probability function of the change in fitness and temperature T, and its magnitude changes with temperature, i.e., the number of iterations. T is the particle annealing temperature. The probability jump characteristic of the Metropolis criterion can help the algorithm escape local optima.
[0049] If the fitness decreases, i.e., f(g+1) < f(g), then the probability is equal to 1, and the particle is updated. If the fitness increases, i.e., f(g+1) ≥ f(g), it means that the newly generated particle is not better than the old particle. However, the algorithm will not keep the original particle unchanged, but will make a probability judgment: first, generate a random number rand in the interval [0, 1]. If rand < P, then the updated final particle is obtained; otherwise, the particle remains unchanged, and proceed to step 6.2.
[0050] Step 6.2: Simulate the annealing process using the annealing algorithm:
[0051] For the annealing temperature T, a cooling coefficient α is set, and after each iteration, the temperature is reduced by applying T = αT, thereby decreasing the probability of accepting differential particles. This achieves the effect of global search in the early stage and local search in the later stage.
[0052] Step 7: Adaptively design the inertia weight in the particle velocity update formula, ensuring that the inertia weight ω is greater than 0.7 in the initial iteration and gradually decreases as the number of iterations increases. Perform boundary checks on the final particle velocity and position generated in Step 6; if the conditions are met, maintain the value; otherwise, make corrections and proceed to Step 4, which specifically includes:
[0053] Step 7.1: In the particle swarm optimization localization algorithm, introduce adaptive changes in inertia weights:
[0054] By constructing a function related to the inertia weight, namely an exponential function, and combining it with beta-distributed random numbers, the change of the inertia weight ω is controlled, which needs to satisfy the characteristic that the function value decreases with the number of iterations. This achieves the effect that in the early stages of the algorithm, a large inertia weight allows particles to fully explore the region; in the later stages of the algorithm, a small inertia weight improves the optimal solution. The expression for the inertia weight ω is:
[0055]
[0056] In the formula, ω min ω represents the minimum inertial weight. max The maximum value of the inertia weight; iter is the current iteration number; iter max σ is the maximum number of iterations; σ is the random correction coefficient; betarnd is used to generate beta-distributed random numbers.
[0057] Step 7.2: Based on the velocity and position boundaries set in Step 3, after each iteration, it is necessary to determine whether the particle's velocity and position exceed the boundary values. If they exceed the boundary values, absorption is performed according to the following formula:
[0058] V i,j =rand*(V max -Vmin )+V min
[0059] In the formula, rand is a random number between 0 and 1, and V max It is the maximum speed, V min It is the minimum speed, V i,j Let be the j-th dimension velocity component of the i-th particle.
[0060] The position absorption formula is as follows:
[0061] X i,j =rand*(X max -X min )+X min
[0062] In the formula, rand is a random number between 0 and 1, and X max It is the maximum value of the position, X min It is the minimum value of the position, X. i,j Let be the j-th position component of the i-th particle.
[0063] This invention is the first to combine multiple loitering missile nodes and achieve high-precision cooperative positioning through particle swarm optimization. It is also the first to increase the stability of particle swarm optimization by combining differential evolution algorithm, simulated annealing algorithm and introducing adaptive changes in inertial weights.
[0064] Figure 2 , Figure 3The figures show a comparison of the localization errors and convergence algebras of the particle swarm optimization localization algorithms SADWDE-PSO, PSO, and SAPSO (which incorporates simulated annealing). It can be observed that PSO exhibits local optima in simulations 9, 35, 56, and 65, with localization errors exceeding 2m. However, the SAPSO and SADWDE-PSO algorithms, combined with annealing, significantly mitigate the local optima of PSO. When the PSO algorithm's localization error exceeds 5m, the localization errors of SAPSO and SADWDE-PSO are around 0.5m. However, in simulations 70 and 88, although PSO does not exhibit local optima, SAPSO's localization errors still reach 0.9m and 0.5m, respectively. The SADWDE-PSO algorithm shows smaller variance and mean localization error compared to both SAPSO and PSO, effectively improving upon the local optima of PSO. Furthermore, the error variance is 0.009, which is higher than the stability of PSO and SAPSO algorithms (0.22 and 0.015, respectively). In addition, comparing the convergence algebras of the three algorithms, it can be found that the SADEDW-PSO algorithm converges to the minimum value around the 20th generation, while SAPSO converges to the minimum value around the 25th generation, indicating that SADEDW-PSO has a faster convergence speed. Therefore, simulations show that the SADEDW-PSO algorithm of this invention can well meet the requirements of loitering munitions for high-precision, high-stability, and rapid target localization.
Claims
1. A target localization method based on particle swarm optimization algorithm, characterized in that, The steps are as follows: Step 1: Using the laser sensor as a node, collect information from the target to obtain the distance information from the node to the target; convert the latitude and longitude information to obtain the node position information in the three-dimensional coordinate system; use the distance information and node position information as input to proceed to Step 2; Step 2: Construct the fitness function in the particle swarm optimization localization algorithm, then proceed to Step 3; The parameters of the fitness function include the target position, the node's own position, and the distance information from the node to the target; Step 3: Initialize the parameters of the particle swarm optimization localization algorithm and randomly generate the velocity and position of the particles, then proceed to Step 4; Step 4: Calculate the individual extreme value and the population extreme value of the particle based on the fitness function. The population extreme value is the solution for the current target position. Determine whether the solution for the target position meets the positioning error requirement. If it does not meet the requirement, proceed to step 5. If it does meet the requirement, output the currently obtained target position. Step 5: Combining the differential evolution algorithm, first, the particles are mutated to obtain intermediate particles. Then, these intermediate particles are crossed with the current particles in different dimensions to obtain new particles. Specifically, this includes: Step 5.1, mutation, is used to generate new solution vectors to enrich the search space and help the algorithm escape local optima: By randomly selecting some existing solution vectors and linearly combining them, a mutation vector is generated, as shown in the equation: ; In the formula, These are intermediate particles obtained through mutation. All are particles randomly selected from the population, and satisfy the following conditions: ;( ) represents the differential vector of the two particle positions, which is the key to the differential evolution algorithm; As a variable factor, Indicates the number of iterations; Step 5.2, Crossover, used to randomly select the mother vector needed for mutation: ; in, Crossover probability refers to the probability of randomly selecting individuals for crossover. The j-th dimension represents the i-th particle. Let the j-th dimension of the new particle be denoted as . Let j represent the j-th dimension of the intermediate particle. Represents a random number between 0 and 1; Proceed to step 6; Step 6: Combining the simulated annealing algorithm, determine whether to select the new particle generated in step 5 as the final particle according to the Metropolis criterion. If the new particle generated in step 5 is selected as the final particle, proceed to step 7; otherwise, the particle remains unchanged, the current particle is selected as the final particle, and proceed to step 7. Step 7: Adaptively design the inertia weights in the particle velocity update formula, so that the inertia weights... In the initial stage of iteration, the value is greater than 0.
7. As the number of iterations increases, the inertia weight... The velocity and position of the final particles generated in step 6 are gradually reduced, and boundary checks are performed on them. If the conditions are met, they remain unchanged; otherwise, they are corrected, and the process proceeds to step 4.
2. The target localization method based on particle swarm optimization algorithm according to claim 1, characterized in that, In step 2, the fitness function in the particle swarm optimization localization algorithm is constructed as follows: Assume that the position coordinates of each particle are... The target coordinates are In the particle swarm optimization localization algorithm, i is the particle index, n is the total number of particles, and the distance information from each node to the target is combined with... fitness function as follows: ; Target location obtained The fitness function should be ,Right now Minimum; considering the positioning error, it is impossible for it to exist. Make But when When the minimum value is reached, the positioning coordinates at this point are the optimal solution for positioning. In this way, the problem of defining the target is transformed into the problem of optimizing and finding the minimum value.
3. The target localization method based on particle swarm optimization algorithm according to claim 2, characterized in that, In step 3, the parameters in the algorithm are initialized, including: number of particles, particle dimension, maximum number of iterations, velocity boundary, position boundary, learning factor, initial temperature, cooling coefficient, crossover probability, mutation factor, weight extrema, and weight random correction factor.
4. The target localization method based on particle swarm optimization algorithm according to claim 3, characterized in that, In step 6, the simulated annealing algorithm is used, and the Metropolis criterion is employed to determine whether to select the new particle generated in step 5. If the new particle generated in step 5 is selected as the final particle, proceed to step 7; otherwise, the particle remains unchanged, and the current particle is used as the final particle, as detailed below: Step 6.1: Use the Metropolis criterion to determine whether to select a new particle: Assumption Let be the fitness of a particle in generation g, and let be the fitness of a particle in generation g+1. ;if If the particle of generation g+1 is superior to that of generation g, then the transfer is guaranteed; otherwise, the probability setting of the following formula is used to determine whether to accept the inferior state: ; In the formula, P is a probability function of the change in fitness and the annealing temperature T, and its magnitude changes with the temperature, i.e. the number of iterations. T is the particle annealing temperature. If the fitness decreases, that is , at this time, the probability is equal to 1, and the particle performs an update operation; if the fitness increases, that is , it means that the newly generated particle is not better than the old particle, but at this time the algorithm will not keep the original particle unchanged, but perform a probability judgment: first generate a random number rand1 in the interval [0, 1], if rand1 < P, the final updated particle is obtained, otherwise the particle remains unchanged and proceeds to step 6.2; Step 6.2: Simulate the annealing process using the annealing algorithm: For the annealing temperature T, a cooling coefficient is set. After each iteration, through Cooling the device reduces the probability of it receiving inferior particles.
5. The target localization method based on particle swarm optimization algorithm according to claim 4, characterized in that, In step 7, the inertia weights in the particle velocity update formula are adaptively designed so that... In the initial iteration, the value is greater than 0.
7. As the number of iterations increases, the value gradually decreases. Boundary checks are performed on the velocity and position of the particles generated in step 6. If the conditions are met, the values remain unchanged; otherwise, corrections are made. Then, the process proceeds to step 4, which specifically includes: Step 7.1: In the particle swarm optimization localization algorithm, introduce adaptive changes in inertia weights: By constructing a function related to the inertia weight, namely an exponential function, and combining it with beta-distributed random numbers, the inertia weight can be controlled. The change needs to satisfy the characteristic that the function value decreases with the number of iterations, and the inertia weight. The expression is: ; In the formula, This represents the minimum value of the inertia weight. This represents the maximum value of the inertia weight. This represents the current iteration number; This represents the maximum number of iterations. For random correction coefficients; Used to generate beta-distributed random numbers; Step 7.2: Based on the velocity and position boundaries set in Step 3, after each iteration, it is necessary to determine whether the particle's velocity and position exceed the boundary values. If they exceed the boundary values, absorption is performed according to the following formula: ; In the formula A random number between 0 and 1. That is the maximum speed. It is the minimum speed. Let j be the velocity component of the i-th particle in the j-th dimension; The position absorption formula is as follows: ; In the formula A random number between 0 and 1. It is the maximum value at position. It is the minimum value of the position. Let be the j-th position component of the i-th particle.