A multi-moving target positioning method and system, an electronic device, and a storage medium

By calculating particle weights and configuring weight thresholds using Gaussian kernel functions, the problems of particle weight degradation and inaccurate motion models in particle filtering algorithms are solved, achieving high precision and high efficiency in multi-target localization and adapting to multi-target motion scenarios.

CN117041881BActive Publication Date: 2026-06-16SUN YAT SEN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUN YAT SEN UNIV
Filing Date
2023-07-18
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, particle filtering algorithms suffer from particle weight degradation and inaccurate motion models during long-term target tracking. Kalman filtering requires linearization, increasing complexity. Ultra-wideband indoor positioning methods require known anchor node information and do not consider the impact of ranging errors, leading to inaccurate positioning.

Method used

The Gaussian kernel function is used to calculate the distance similarity between particles and the base station. The weight threshold and ratio are configured to determine the particle set. The particle weight is calculated using the Gaussian kernel function. The distance between particles and the base station is calculated by combining the base station coordinate matrix and the particle coordinates. The target distance measured by the base station is obtained, and similarity calculation is performed to determine the final estimated position.

🎯Benefits of technology

The robustness of the particle filtering algorithm has been improved, the accuracy of particle weight calculation has been enhanced, the impact of noise has been reduced, it is adapted to multi-target motion models, particle diversity has been preserved, and positioning accuracy and operating efficiency have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117041881B_ABST
    Figure CN117041881B_ABST
Patent Text Reader

Abstract

The application discloses a multi-mobile target positioning method and system, electronic equipment and a storage medium. The method comprises the following steps: calculating the distance from a particle to a base station according to the coordinate matrix of the base station and the coordinates of the particle to obtain a first distance vector; obtaining the distance from each target to the base station measured by the base station to obtain a second distance vector; performing similarity calculation on the first distance vector and the second distance vector by using a Gaussian kernel function to obtain a first particle weight vector; configuring a weight threshold value, determining a first particle set according to the first particle weight vector and the weight threshold value; determining a second particle set in the first particle set according to a preset proportion, and determining a second particle weight vector; and determining a final estimated position according to the second particle set and the second particle weight vector. The application can accurately calculate the weight of the particle, simultaneously position multiple targets, adapt to the motion model of multiple targets, and retain the diversity of the particle, and can be widely applied to the technical field of multi-target positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-moving target localization technology, and in particular to a multi-moving target localization method, system, electronic device, and storage medium. Background Technology

[0002] Traditional particle filtering algorithm: This is a target tracking method based on Bayesian filtering theory. The algorithm first initializes the target's state, including its position, velocity, and acceleration. Then, it predicts the target's state based on its motion model. After prediction, the particle weights are updated based on the observed target information. A common method is to calculate the distance between the particle and the observed information; particles with smaller distances have higher weights. After weight updates, the particles are resampled to ensure particle diversity. Finally, the target state is estimated based on the particle weights, typically by taking a weighted average of the states of all particles to obtain the final target state estimate.

[0003] The Extended Kalman Filter (EKF) algorithm is a nonlinear system state estimation algorithm based on Kalman filtering. It linearizes the nonlinear system, transforming the nonlinear problem into a linear one, thus enabling state estimation. The basic idea of ​​EKF is to approximate the nonlinear function as a linear function by performing a first-order Taylor expansion on the nonlinear system, thereby transforming the nonlinear problem into a linear one. Specifically, EKF divides system state estimation into two steps: prediction and update. In the prediction step, EKF uses the system's state transition equation and control input to predict the state value and covariance matrix at the next time step. This predicted value is obtained by linearly transforming the state value at the previous time step. In the update step, EKF uses the measurement equation and measurement results to update the predicted value. This updated value is obtained by linearly transforming the predicted value.

[0004] Existing technology also includes an ultra-wideband indoor positioning method based on least squares and trilateration. This method utilizes the acquired distance information and employs an improved joint algorithm of least squares and trilateration to perform a two-step solution process on the ranging results, thereby obtaining a more accurate positioning result. The implementation steps include: acquiring the distance information between four anchor nodes and the tag; processing the ranging data to obtain two coordinate solutions symmetric about the anchor node plane; obtaining the precise position coordinates of the tag based on the two symmetric solutions; and outputting the calculated tag position coordinates. This method improves the data transmission rate by utilizing ultra-wideband technology in complex indoor environments, combines the original trilateration technology with the least squares method, and improves the least squares method to enhance the efficiency of solving the multivariate equation system for position coordinates.

[0005] The following defects exist in the existing technology:

[0006] 1. Particle degradation problem: In the process of tracking a target for a long time, the weights of particles in traditional particle filtering algorithms will degrade, that is, only a small number of particles have very large weights, while the weights of other particles are very small. This will lead to inaccurate estimation results of the algorithm.

[0007] 2. Problem of inaccurate motion model: The performance of localization algorithms is easily affected by the target motion model, especially in the case of multi-target motion, where the motion trajectories of each target are different.

[0008] 3. Kalman filtering requires linearization of the system state and fine-tuning of the system model to transform a nonlinear problem into a linear one. This can lead to larger estimation errors and increase the complexity of the algorithm.

[0009] 4. The ultra-wideband indoor positioning method combining least squares and trilateration requires the coordinate information of at least four anchor nodes and the distance information between the anchor nodes and the tags to be determined in advance. When solving the matrix equation system using distance and coordinates, the influence of ranging error is not taken into account. Therefore, when the tag moves frequently and the ranging is inaccurate, it will produce a large deviation in the final positioning result of the moving target. Summary of the Invention

[0010] This invention aims to at least partially solve one of the technical problems in related technologies. To this end, this invention proposes a method, system, electronic device, and storage medium for locating multiple moving targets.

[0011] On one hand, embodiments of the present invention provide a method for locating multiple moving targets, including:

[0012] The distance from the particle to the base station is calculated based on the coordinate matrix of the base station and the coordinates of the particle to obtain a first distance vector; wherein, there are several particles;

[0013] The distances from each target to the base station are obtained by the base station to obtain a second distance vector;

[0014] The similarity between the first distance vector and the second distance vector is calculated using a Gaussian kernel function to obtain the first particle weight vector;

[0015] Configure a weight threshold, and determine the first particle set based on the first particle weight vector and the weight threshold;

[0016] According to a preset ratio, a second particle set is determined from the first particle set, and a second particle weight vector is determined.

[0017] The final estimated position is determined based on the second set of particles and the second particle weight vector.

[0018] Optionally, the step of calculating the distance from the particle to the base station based on the coordinate matrix of the base station and the coordinates of the particle to obtain the first distance vector includes:

[0019] Calculate the Euclidean distance between the coordinates of each particle and the coordinates of all base stations to obtain the first distance vector;

[0020] The formula for calculating the first distance vector is as follows:

[0021]

[0022] Among them, [particle_distances i,j ] represents the matrix of the first distance vector; X i Y represents the x-coordinate of the i-th particle; i BX represents the ordinate of the i-th particle. j This represents the x-coordinate matrix of the j-th base station; BY j Let represent the ordinate matrix of the j-th base station.

[0023] Optionally, the step of using a Gaussian kernel function to calculate the similarity between the first distance vector and the second distance vector to obtain the first particle weight vector includes:

[0024] Calculate the distance difference between the first distance vector and the second distance vector;

[0025] Calculate the first standard deviation based on the distance difference and the standard deviation of the Gaussian kernel function;

[0026] The likelihood vector of the particle is obtained by performing an exponential operation on the first standard deviation;

[0027] The first particle weight vector is determined based on the likelihood vector of each particle.

[0028] Optionally, configuring the weight threshold, determining the first particle set based on the first particle weight vector and the weight threshold, includes:

[0029] Sort the first particle weight vector to obtain the first result vector;

[0030] Among all the first calculation result vectors, determine the particle weights that are greater than the weight threshold to obtain the second result vector;

[0031] The first particle set is determined based on the second result vector.

[0032] Optionally, determining the second particle set from the first particle set according to a preset ratio includes:

[0033] The second result vector is sorted to obtain a third result vector; wherein each element value in the second result vector represents the particle weight of the particle in the first particle set;

[0034] Obtain the predetermined ratio of the configuration, and determine the fourth result vector from the third result vector according to the predetermined ratio;

[0035] The second particle set is determined based on the fourth result vector.

[0036] Optionally, determining the final estimated position based on the second particle weight vector of the second particle set includes: repeating the second particle weight vector of the second particle set into a matrix of the same size as the particle matrix of the second particle set to obtain a repeating matrix;

[0037] Multiply the second particle set by the second particle weight vector to obtain the first calculation result;

[0038] Multiply the first calculation result by the repeating matrix to obtain the second calculation result;

[0039] The final estimated position is obtained by calculating the quotient of the second calculation result and the sum of the weight vectors of the second particles.

[0040] Optionally, the formula for calculating the final estimated position is:

[0041] [estimated_positions]=sum(weighted_particles) / sum(sorted_weights(idx))

[0042] Where [estimated_positions] is the vector of the final estimated positions; sum(weighted_particles) is the sum of the second calculation results, sum(sorted_weights(idx)) is the sum of the second particle weight vectors; and idx is the particle index.

[0043] On the other hand, embodiments of the present invention also provide a multi-moving target positioning system, comprising:

[0044] The first module is used to calculate the distance from the particle to the base station based on the coordinate matrix of the base station and the coordinates of the particle, and obtain a first distance vector; wherein, there are several particles;

[0045] The second module is used to obtain the distances from each target to the base station as measured by the base station, and to obtain a second distance vector;

[0046] The third module is used to perform similarity calculation on the first distance vector and the second distance vector using a Gaussian kernel function to obtain the first particle weight vector;

[0047] The fourth module is used to configure the weight threshold and determine the first particle set based on the first particle weight vector and the weight threshold.

[0048] The fifth module is used to determine the second particle set in the first particle set according to a preset ratio, and to determine the second particle weight vector;

[0049] The sixth module is used to determine the final estimated position based on the second particle set and the second particle weight vector.

[0050] On the other hand, embodiments of the present invention also provide an electronic device, including: a processor and a memory; the memory is used to store a program; the processor executes the program to implement the method described above.

[0051] On the other hand, embodiments of the present invention also provide a computer storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the method described above.

[0052] The embodiments of the present invention have the following beneficial effects:

[0053] The distance from the particle to the base station is calculated based on the coordinate matrix of the base station and the coordinates of the particle, resulting in a first distance vector. The distances from each target to the base station, measured by the base station, are then obtained, resulting in a second distance vector. A Gaussian kernel function is used to perform similarity calculations on the first and second distance vectors, yielding a first particle weight vector. The Gaussian kernel function, with its smoothness and locality of reference, can capture nonlinear relationships between data points. In this embodiment, the weight reflects the probability of a particle's position relative to the target. Using a Gaussian kernel function to calculate the particle weights and perform similarity calculations improves the robustness of the particle filtering algorithm, enhances the accuracy of particle weight calculation, and further improves positioning accuracy. Furthermore, the Gaussian kernel function can reduce the impact of noise on target positioning.

[0054] Configure a weight threshold, determine a first particle set based on the first particle weight vector and the weight threshold; determine a second particle set from the first particle set according to a preset ratio, and determine a second particle weight vector; retain a certain proportion of particles while retaining particles with larger weights, which ensures the number of particles, enabling subsequent algorithm iterations, while reducing iteration time costs and improving running efficiency; determine the final estimated position based on the second particle set and the second particle weight vector.

[0055] Overall, the method of the present invention can accurately calculate the weight of particles, locate multiple targets simultaneously, adapt to the motion models of multiple targets, and preserve the diversity of particles. Attached Figure Description

[0056] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0057] Figure 1 This is a flowchart illustrating the steps of the multi-moving target localization method provided in an embodiment of the present invention;

[0058] Figure 2 This is a flowchart of the multi-moving target localization method provided in the embodiments of the present invention;

[0059] Figure 3 This is a schematic diagram of the planar construction provided in an embodiment of the present invention;

[0060] Figure 4 This is a schematic diagram of the target in a scene provided in an embodiment of the present invention;

[0061] Figure 5 This is a flowchart illustrating an implementation example provided in this invention.

[0062] Figure 6These are experimental result diagrams provided in the embodiments of the present invention;

[0063] Figure 7 This is a schematic diagram of the structure of the multi-moving target positioning system provided in an embodiment of the present invention;

[0064] Figure 8 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0066] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100," "second / S200," etc., in the specification, claims, and the aforementioned figures are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0067] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0068] Reference Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating the steps of the multi-moving target localization method provided in an embodiment of the present invention. Figure 2 This is a flowchart of a multi-moving target localization method provided in an embodiment of the present invention, which includes the following steps S100 to S600:

[0069] S100. Calculate the distance from the particle to the base station based on the coordinate matrix of the base station and the coordinates of the particle to obtain the first distance vector; where there are several particles.

[0070] Step S100 includes the following step S110.

[0071] S110. Calculate the Euclidean distance between the coordinates of each particle and the coordinates of all base stations to obtain the first distance vector;

[0072] The formula for calculating the first distance vector is as follows:

[0073]

[0074] Among them, [particle_distances i,j ] represents the matrix of the first distance vector; X i Y represents the x-coordinate of the i-th particle; i BX represents the ordinate of the i-th particle. j This represents the x-coordinate matrix of the j-th base station; BY j Let represent the ordinate matrix of the j-th base station.

[0075] S200. Obtain the distance from each target to the base station as measured by the base station, and obtain the second distance vector.

[0076] At a certain moment, each base station measures the distance values ​​of multiple moving targets located in the plane constructed by the base station from these base stations at that moment. In this embodiment of the invention, the distance values ​​measured by the base stations are obtained and a second distance vector is formed.

[0077] Specifically, there are many ranging technologies. The ranging technology used in this invention can be modified according to actual application scenarios to adapt to the positioning accuracy required in more scenarios. The following describes a two-way ranging technology:

[0078] A base station is a device used to transmit signals, primarily for measuring and calculating the distance or angle between a target and the base station to determine the target's location. Multiple base stations used in combination in space can form a local area network for precise spatial positioning. Tags are integrated onto the target.

[0079] T t T represents the time interval between the base station transmitting a data signal and receiving a response signal from the tag; r This represents the time interval between the tag receiving a data signal from the base station and sending a response signal; the one-way flight time of the signal between the tag and the base station is:

[0080]

[0081] The formula for calculating the distance d between the target and the base station is:

[0082] d = c·T f

[0083] Where c represents the propagation speed of electromagnetic waves.

[0084] The distance values ​​measured by the base station are represented as the second distance vector [measure_distances]. i,j ], then [measure_distances i,jThe element in the i-th row and j-th column of the matrix represents the distance from the i-th target to the j-th base station at a certain moment.

[0085] S300. The Gaussian kernel function is used to calculate the similarity between the first distance vector and the second distance vector to obtain the first particle weight vector.

[0086] The expression for the Gaussian kernel function in this embodiment of the invention is as follows:

[0087]

[0088] Where x and y are two data points, ||xy|| 2 σ represents the square of the Euclidean distance between x and y; σ is a positive width parameter; when x and y are relatively close, the value of the Gaussian kernel function is close to 1; when x and y are relatively far apart, the value of the Gaussian kernel function is close to 0.

[0089] The similarity between the two data points is calculated using a Gaussian kernel function, thus obtaining the particle weights and forming the first particle weight vector. The width parameter σ of the Gaussian kernel function can be adjusted according to the actual application scenario.

[0090] Specifically, step S300 includes the following steps S310 to S340.

[0091] S310. Calculate the distance difference between the first distance vector and the second distance vector.

[0092] The formula for calculating the distance difference can be:

[0093] difference=particle_distances i,j -measure_distances i,j

[0094] Where difference represents the distance difference between the particle and the target, particle_distances i,j From the first distance vector [particle_distances] i,j The elements retrieved from [], measure_distances i,j From the second distance vector [measure_distances] i,j The element retrieved from ].

[0095] S320. Calculate the first standard deviation based on the distance difference.

[0096] The formula for calculating the first standard deviation is:

[0097]

[0098] Wherein, P is the first standard deviation; M is a variable parameter that can be modified according to the actual application scenario to improve positioning accuracy. In this embodiment of the invention, M = 0.5; sigma represents the standard deviation of the Gaussian kernel function.

[0099] S330. Determine the likelihood vector of the particle based on the first standard deviation.

[0100] The formula for calculating the likelihood vector can be:

[0101] likelihoods = ln P

[0102] Where likelihoods represents the likelihood vector; P represents the first standard deviation.

[0103] S340. Determine the weight vector of the first particle based on the likelihood vector of each particle.

[0104] The formula for calculating the weight vector of the first particle can be:

[0105] weights i =likelihoods1 × likelihoods2 × (......) × likelihoods N

[0106] In the formula, weights i Represents the weight of the i-th particle; likelihoods N It is the Nth likelihood value of the i-th particle.

[0107] In this embodiment of the invention, all likelihood values ​​of each particle are multiplied together to obtain the weight of that particle. The larger the weight, the more likely the particle is to describe the true target state, and the particle will be sampled more frequently in the next iteration of training.

[0108] Determine the first particle weight vector [weights] based on the weight of each particle. i ] = [w1, w2, (......), w n ], where w1, w2, (...), w n This represents an element in the weight vector.

[0109] In particle filtering algorithms, the Gaussian kernel function is used to calculate particle weights. The weights reflect the likelihood of a particle's position relative to the target. The likelihood value for each particle is obtained by calculating the square of the difference between the predicted and actual distances, dividing by the square of σ, and then taking the negative exponent. Finally, all likelihood values ​​are multiplied to obtain the particle weights. This results in particles that are closer to the target having larger weights, while particles that are farther away have smaller weights. Using the Gaussian kernel function to calculate particle weights allows for a more accurate calculation of the particle weight distribution, thereby improving the localization accuracy of particle filtering.

[0110] S400. Configure weight thresholds and determine the first particle set based on the first particle weight vector and weight thresholds.

[0111] Specifically, step S400 includes the following steps S410 to S430.

[0112] S410. Sort the weight vector of the first particle to obtain the first result vector.

[0113] S420. Determine the particle weights greater than the weight threshold from all the first calculation result vectors to obtain the second result vector.

[0114] S430. Determine the first particle set based on the second result vector.

[0115] It should be noted that the first particle set is the set of particles corresponding to the weight of each particle in the second result vector.

[0116] S500. According to the preset ratio, determine the second particle set in the first particle set, and determine the weight vector of the second particle.

[0117] In the resampling step, the number of particles selected is chosen based on a suitable proportion of the previously retained number of particles, thus obtaining the final particles for subsequent iterations. For example, if 5000 particles are retained, the top 10% with the highest weights are kept; if 3000 particles are retained, the top 20% with the highest weights are kept. This ensures a sufficient number of particles for subsequent algorithm iterations while improving the algorithm's efficiency. It should be noted that the specific values ​​in the above example are merely illustrative; other proportions and particle numbers can be selected in other embodiments. The weight combination corresponding to each particle in the second particle set constitutes the second particle weight vector.

[0118] Step S500 may include the following steps S510 to S530.

[0119] S510. Sort the second result vector to obtain the third result vector; where each element value in the second result vector represents the particle weight of the particle in the first particle set.

[0120] Specifically, the vector can be sorted from largest to smallest to obtain a third result vector in descending order.

[0121] S520. Obtain the predetermined ratio of the configuration, and determine the fourth result vector in the third result vector according to the predetermined ratio.

[0122] Specifically, according to the sorting method of S510, the values ​​with larger weights are obtained according to a preset ratio to form the fourth result vector.

[0123] S530. Determine the second particle set based on the fourth result vector.

[0124] It should be noted that the second particle set is the set of particles corresponding to the weight of each particle in the fourth result vector.

[0125] S600. Determine the final estimated position based on the weight vector of the second particle in the second particle set.

[0126] Step S600 may include the following steps S610 to S640. S610: Repeat the second particle weight vector of the second particle set into a matrix with the same size as the particle matrix of the second particle set to obtain a repeating matrix.

[0127] S620. Multiply the second particle set by the second particle weight vector to obtain the first calculation result.

[0128] S630. Multiply the first calculation result by the repeating matrix to obtain the second calculation result.

[0129] S640. Calculate the quotient of the second calculation result and the sum of the weight vectors of the second particles to obtain the final estimated position.

[0130] Specifically, the formula for calculating the final estimated location is:

[0131] [estimated_positions]=sum(weighted_particles) / sum(sorted_weights(idx));

[0132] Where [estimated_positions]) is the vector of final estimated positions; sum(weighted_particles) is the sum of weighted particles; sum(sorted_weights(idx)) is the sum of weight vectors; and idx is the particle index.

[0133] Before performing step S100, the following step S700 may also be included: constructing a coordinate plane and generating particles.

[0134] S700: Construct a coordinate plane based on the range of movement of the base station and the target, randomly generate particles on the coordinate plane and record their coordinates.

[0135] A two-dimensional coordinate plane is constructed based on the base station and the target's movement range. The coordinates of the particles are randomly generated, and the particles are confined within the constructed plane. In some embodiments, this coordinate plane can be constructed by the base station.

[0136] Specifically, in this embodiment, referring to Figure 3 , Figure 3 This is a schematic diagram of planar construction provided in an embodiment of the present invention. A rectangular region is defined as a two-dimensional coordinate plane based on one or more fixed base stations 301 and one or more mobile base stations 302. The length of this region is Length, and the width is Width. (Refer to...) Figure 4 , Figure 4 This is a schematic diagram of the target in a scene provided by an embodiment of the present invention. Multiple targets 401 are moving within this area. Based on actual needs, N random numbers x (N greater than the number of targets) following a [0, 1] distribution are generated. i and y i Then the particle's coordinates (X) i Y i The formula for calculating ) is:

[0137] X i =x i ×Length

[0138] Y i =y i ×Width;

[0139] The coordinates of these particles can be represented as a matrix [particle] i ] = [X i Y i ], where the i-th row represents the coordinates of the i-th particle.

[0140] The embodiments of the present invention have the following beneficial effects:

[0141] 1. Accurately calculate the weights of particles and their likelihood values.

[0142] 2. It can locate multiple targets simultaneously and adapt to the motion models of multiple targets.

[0143] 3. The problem of particle degeneration during algorithm iteration has been optimized to preserve particle diversity as much as possible.

[0144] 4. By setting a resampling threshold, selecting a high-weight particle ratio, and setting the maximum number of iterations, this invention can flexibly adjust the performance of the localization method to meet the needs of different scenarios.

[0145] 5. Significantly reduces positioning errors in scenarios where both the target and the base station are moving.

[0146] The following describes an implementation example of an embodiment of the present invention:

[0147] Reference Figure 5 , Figure 5 This is a flowchart illustrating an implementation example provided in this embodiment of the invention.

[0148] First, construct the required positioning scene and build a plane. In this implementation example, 25 moving targets are configured. Therefore, a certain number of particle coordinates are randomly generated, and these particles are confined to the plane constructed by the base station. Specifically, the number of particles can be configured according to actual needs. The formula for generating particle coordinates is:

[0149] particles(:,1)=rand(1,num_particles)*Length;

[0150] particles(:,2)=rand(1,num_particles)*Width;

[0151] Where particles(:,1) represents the first column of all rows of the vector; num_particles is the number of particles; Length and Width represent the length and width of the plane, respectively. The above formula represents the generation of N random numbers x that follow a uniform distribution on [0,1] using the rand function. i and y i Multiplying this by Length and Width gives the particle's coordinates (X). i Y i ), where N is specified by the variable num_particles, and the coordinates of the particles are confined to a rectangular area, the length and width of which are specified by the variables Length and Width. It should be noted that, in this embodiment of the invention, when the vector is represented in the form of particles(:, 1) or particles(1,:), the following interpretation applies: when the parameter is the symbol ":", depending on the position of the symbol ":", it can represent all rows or all columns of the vector.

[0152] The coordinates of these particles can be stored in a matrix [particle], represented as: [particle i ] = [X i Y i The i-th row represents the coordinates of the i-th particle. Calculate the distance from each particle to each base station in the plane:

[0153] particle_distances=pdist2(particles(i,:),base_stations);

[0154] Where particles(i, :) represent the coordinates of the i-th particle, which is a one-dimensional row vector containing the coordinate values ​​of the particle in each dimension. base_stations is the coordinate matrix of the base stations, where each row represents the coordinates of a base station, also a one-dimensional row vector. In this example, the x-coordinate of each base station is stored in matrix [BX]; the y-coordinate of each base station is stored in matrix [BY]. Therefore, the specific expression of the coordinate matrix [base_stations] is:

[0155] [base_stations j ] = [BX j BY j ]

[0156] The `pdist2` function calculates the Euclidean distance between the coordinates of each particle and the coordinates of all base stations, returning a distance matrix `[particle_distances]`. i,j The element in the i-th row and j-th column of this distance matrix represents the distance between the i-th particle and the j-th base station. Therefore, [particle_distances] is a one-dimensional row vector containing the distances between all particles and all base stations.

[0157] Distance matrix [particle_distances] i,j The formula for calculating ] is:

[0158]

[0159] Based on this, the Gaussian kernel function in this implementation example is calculated as follows:

[0160]

[0161] Among them, particle_distances i,j : The distance from the particle to each base station; measure_distances i,j : The distance from each target to each base station at a certain time; σ controls the width of the kernel function. When two data points are close to each other, the value of the Gaussian kernel function is close to 1; when the data points are far apart, the value of the Gaussian kernel function is close to 0.

[0162] [measure_distances i,jThe data in this data is acquired through ranging technology. There are many types of ranging technology, and ranging refers to the distance from each target to each base station at a given moment. Below, we introduce a two-way ranging technology:

[0163] T t T is the time interval between the base station transmitting a data signal and receiving a response signal from the tag. r The time interval between the tag receiving a data signal from the base station and sending a response signal; the one-way flight time of the signal between the tag and the base station.

[0164] The distance between the target and the base station is calculated as: d = c·T f , where c represents the propagation speed of electromagnetic waves.

[0165] [measure_distances i,j The element in the i-th row and j-th column of the matrix represents the distance from the i-th target to the j-th base station at a certain moment.

[0166] A base station is a device used to transmit signals, primarily for measuring and calculating the distance or angle between a target and the base station to determine the target's location. Multiple base stations used in combination in space can form a local area network for precise spatial positioning. Tags are integrated onto the target. The similarity between two data points is calculated using a Gaussian kernel function to obtain the particle's weight. The width parameter σ of the Gaussian kernel function can be adjusted according to the specific application scenario.

[0167] Furthermore, the particle weights are calculated based on the aforementioned Gaussian kernel function, expressed as:

[0168] likelihoods=exp(-0.5*(particle_distances-measure_distances(target_idx,:))....^2 / sigma^2);

[0169] weights(i)=prod(likelihoods);

[0170] Where, likelihoods is the likelihood vector for each particle; (target_idx, :) represents the particle weights calculated for each target using a Gaussian kernel function based on the ranging values ​​from the base station; sigma represents the standard deviation of the Gaussian kernel function; prod() represents the multiplication operation. The calculated first particle weight vector can be represented as:

[0171] [weights i ] = [w1, w2, (......), w n ]

[0172] Where w1, w2, (...), w n This represents an element in the first particle weight vector. Particles with larger final weights will be sampled more frequently in the next iteration because they are more likely to describe the true target state.

[0173] In particle filtering algorithms, the Gaussian kernel function is used to calculate particle weights. The weights reflect the likelihood of a particle's position relative to the target. The likelihood value for each particle is obtained by calculating the square of the difference between the predicted and actual distances, dividing by the square of σ, and then taking the negative exponent. Finally, all likelihood values ​​are multiplied to obtain the particle weights. This results in particles that are closer to the target having larger weights, while particles that are farther away have smaller weights. Using the Gaussian kernel function to calculate particle weights allows for a more accurate calculation of the particle weight distribution, thereby improving the localization accuracy of particle filtering.

[0174] Furthermore, the weight vector `weights` of the first particle is sorted in descending order, and the sorted values ​​and their corresponding indices are returned, specifically as follows:

[0175] [~, idx]=sort(weights,'descend');

[0176] This expression sorts the first particle weight vector [weights] in descending order and returns the sorted index; where weights(i) represents the weight of the i-th particle. sort(weights, 'descend') means sorting the first particle weight vector in descending order using the sort() function and returning the first result vector [sorted_weights], where sorted_weights(j) represents the j-th weight after sorting.

[0177] Then, the sorted indices are stored in the variable [idx], with the expression:

[0178] [~, idx]=sort(weights,'descend')

[0179] Where idx(j) represents the position of the j-th particle in the original weight vector after sorting.

[0180] Furthermore, resampling is performed based on the calculated particle weights. Specifically, a threshold is applied to the first result vector to obtain a second result vector, and the first particle set is determined based on the second result vector. Then, an appropriate ratio (select_ratio) is configured to obtain the particles that will ultimately be used in subsequent iterations, which serve as the second particle set, expressed as:

[0181] selected_particles=particles(idx(1:round(num_particles*select_ratio)),:);

[0182] Where [particles] is the particle matrix; particles(i,:) represents the coordinates of the i-th particle; [idx] is the sorted index vector; idx(j) represents the position of the j-th particle in the original particle matrix after sorting; num_particles represents the total number of particles; select_ratio represents the proportion of particles selected (a value between 0 and 1).

[0183] The calculation process is as follows: First, select a subset of particles from the particle matrix according to a proportional value, calculate the number of selected particles, which will yield an integer value representing the number of particles to be selected. These particles form the second particle set. That is, select_particles = round(num_particles × select_ratio), and store them in a new matrix. Then, calculate idx(1: round(num_particles × select_ratio)), obtaining a new index vector, denoted as [selected_idx], where selected_idx(k) represents the position of the k-th selected particle in the original particle matrix. Finally, calculate [selected_particles] = particles(selected_idx, :), storing the coordinates of the selected particles in a new matrix [selected_particles]. selected_particles(k, :) represents the coordinates of the k-th selected particle.

[0184] Furthermore, the final estimated position of the target calculated based on the particles can be specifically expressed as:

[0185] estimated_positions(target_idx,:)

[0186] =sum(selected_particles.*repmat(weights(...idx(1:round(num_particles*select_ratio))), 1, 2)) / sum(weights(idx(1:round(...num_particles*select_ratio))));

[0187] Here, `estimated_positions` is a matrix that stores the estimated position of each target. The final estimated position of the target can be obtained by calculating the sum of the weighted particle coordinates and dividing by the sum of the weights.

[0188] The specific calculation process is as follows:

[0189] Sort the weight vectors in descending order and select the first subset of particles to form the second particle set. This can be represented as:

[0190] sorted_weights=sort(weights,'descend');

[0191] idx=1: round(num_particles×select_ratio);

[0192] Here, [sorted_weights] is the weight vector sorted in descending order, and [idx] is the index vector of the selected particles.

[0193] Next, the selected set of second particles is multiplied by the second particle weight vector, and the result is multiplied by a repeating matrix. This can be represented as:

[0194] selected_particles=repmat(selected_particles, 1, 2);

[0195] weighted_particles=selected_particles×repmat(sorted_weights(idx), 1, 2);

[0196] Here, [selected_particles] is the selected particle matrix, and repmat(sorted_weights(idx), 1, 2) is a matrix that repeats the sorted second particle weight vector into a matrix of the same size as [selected_particles].

[0197] Finally, the sum of the weighted particles is divided by the sum of the weight vectors to obtain the estimated position. This can be expressed as:

[0198] estimated_positions(target_idx,:)

[0199] =sum(weighted_particles) / sum(sorted_weights(idx));

[0200] Among them, estimated_positions(target) - `idx,:)` is the estimated position vector, `sum(weighted_particles)` is the sum of the weighted particles, i.e., the second calculation result, and `sum(sorted_weights(idx))` is the sum of the weight vectors of the second particles; `id` x It's a particle index.

[0201] Reference Figure 6 , Figure 6 This is an experimental result diagram provided by an embodiment of the present invention. In the diagram, x and y are combined to represent coordinates, and different rows represent different moving targets, such as... Figure 6 There are 25 moving targets, and at a certain moment, 25 corresponding position prediction results are generated. From Figure 6 As can be seen from the above, the method of this invention can locate multiple targets simultaneously, and the positioning prediction accuracy is high and the prediction effect is good.

[0202] On the other hand, embodiments of the present invention also provide a multi-moving target positioning system, such as Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of a multi-moving target positioning system provided in an embodiment of the present invention. The system includes:

[0203] The first module is used to calculate the distance from the particle to the base station based on the coordinate matrix of the base station and the coordinates of the particle, and obtain the first distance vector; wherein, there are several particles;

[0204] The second module is used to obtain the distance from each target to the base station as measured by the base station, and to obtain the second distance vector;

[0205] The third module is used to perform similarity calculation on the first distance vector and the second distance vector using a Gaussian kernel function to obtain the first particle weight vector;

[0206] The fourth module is used to configure the weight threshold and determine the first particle set based on the first particle weight vector and the weight threshold.

[0207] The fifth module is used to determine the second particle set from the first particle set according to a preset ratio;

[0208] The sixth module is used to determine the final estimated position based on the weight vector of the second particle in the second particle set.

[0209] On the other hand, embodiments of the present invention also provide an electronic device, such as... Figure 8 As shown, Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device includes: a processor and a memory; the memory is used to store a program; the processor executes the program to implement the method described above, thereby achieving the above-mentioned beneficial effects.

[0210] On the other hand, embodiments of the present invention also provide a computer storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the method described above, thereby achieving the aforementioned beneficial effects.

[0211] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.

[0212] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0213] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0214] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0215] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0216] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0217] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0218] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A method for locating multiple moving targets, characterized in that, include: The distance from the particle to the base station is calculated based on the coordinate matrix of the base station and the coordinates of the particle to obtain a first distance vector; wherein, there are several particles; The distances from each target to the base station are obtained by the base station to obtain a second distance vector; The similarity between the first distance vector and the second distance vector is calculated using a Gaussian kernel function to obtain the first particle weight vector; Configure a weight threshold, and determine the first particle set based on the first particle weight vector and the weight threshold; According to a preset ratio, a second particle set is determined from the first particle set, and a second particle weight vector is determined. The final estimated position is determined based on the second particle set and the second particle weight vector; The step of using a Gaussian kernel function to calculate the similarity between the first distance vector and the second distance vector to obtain the first particle weight vector includes: Calculate the distance difference between the first distance vector and the second distance vector; Calculate the first standard deviation based on the distance difference and the standard deviation of the Gaussian kernel function; The likelihood vector of the particle is obtained by performing an exponential operation on the first standard deviation; The first particle weight vector is determined based on the likelihood vector of each particle. The configuration weight threshold, based on the first particle weight vector and the weight threshold, determines the first particle set, including: Sort the first particle weight vector to obtain the first result vector; Among all the first result vectors, determine the particle weights that are greater than the weight threshold to obtain the second result vector; The first particle set is determined based on the second result vector; The step of determining the second particle set from the first particle set according to a preset ratio includes: The second result vector is sorted to obtain a third result vector; wherein each element value in the second result vector represents the particle weight of the particle in the first particle set; Obtain the predetermined ratio of the configuration, and determine the fourth result vector from the third result vector according to the predetermined ratio; The second particle set is determined based on the fourth result vector; The step of determining the final estimated position based on the second particle weight vector of the second particle set includes: The second particle weight vector of the second particle set is repeated into a matrix of the same size as the particle matrix of the second particle set to obtain the repeating matrix; Multiply the second particle set by the second particle weight vector to obtain the first calculation result; Multiply the first calculation result by the repeating matrix to obtain the second calculation result; The final estimated position is obtained by calculating the quotient of the sum of the second calculation results and the sum of the weight vectors of the second particles.

2. The multi-moving target localization method according to claim 1, characterized in that, The step of calculating the distance from the particle to the base station based on the coordinate matrix of the base station and the coordinates of the particle to obtain a first distance vector includes: Calculate the Euclidean distance between the coordinates of each particle and the coordinates of all base stations to obtain the first distance vector; The formula for calculating the first distance vector is as follows: in,[ ] represents the matrix of the first distance vector; Represents the x-coordinate of the i-th particle; Represents the ordinate of the i-th particle; The matrix representing the x-coordinates of the j-th base station; Let represent the ordinate matrix of the j-th base station.

3. The multi-moving target localization method according to claim 1, characterized in that, The formula for calculating the final estimated location is as follows: in, It is the vector of the final estimated position; It is the sum of the second calculation results. It is the sum of the weight vectors of the second particle; For particle indexing.

4. A system for implementing the multi-moving target localization method as described in any one of claims 1-3, characterized in that, include: The first module is used to calculate the distance from the particle to the base station based on the coordinate matrix of the base station and the coordinates of the particle, and obtain a first distance vector; wherein, there are several particles; The second module is used to obtain the distances from each target to the base station as measured by the base station, and to obtain a second distance vector; The third module is used to perform similarity calculation on the first distance vector and the second distance vector using a Gaussian kernel function to obtain the first particle weight vector; The fourth module is used to configure the weight threshold and determine the first particle set based on the first particle weight vector and the weight threshold. The fifth module is used to determine the second particle set from the first particle set according to a preset ratio, and to determine the second particle weight vector; The sixth module is used to determine the final estimated position based on the second particle set and the second particle weight vector.

5. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 3.

6. A computer storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to implement the method as described in any one of claims 1 to 3.