Disclosure of Invention
The invention aims to provide a positioning scheme of an indoor cluster target aiming at the defects of the indoor cluster positioning scheme, so as to reduce the positioning error of a large indoor scene and improve the positioning precision.
In order to achieve the above purpose, the technical scheme of the invention comprises the following steps:
1. The method for positioning the indoor cluster target is characterized by comprising the following steps:
s1) obtaining ranging information and self-moving information of all nodes in a cluster;
s2) sequencing the undesitioned nodes according to the hop count from the base station from small to large, and selecting the undesitioned node with the smallest hop count from the base station as a target to be positioned;
S3) calculating a located per-node trust value u i:
Wherein R i={ri,1,ri,2,...,ri,j,…ri,K is a set formed by adjacent nodes of a positioned node i, R i,j is the j-th adjacent node of the positioned node i, K is the number of adjacent nodes of the positioned node i, delta i,j is the measured distance between the positioned node i and the positioned node j, d i,j is the calculated distance between the positioned node i and the positioned node j obtained according to positioning coordinates, mui is the m-th historical trust value of the positioned node i, the upper limit tau of m is 4-5, and alpha is a parameter for adjusting the weight of the historical trust value in the current trust value;
S4) taking all the positioned nodes as virtual base stations, selecting a base station A with the maximum trust value, which can cover the target to be positioned, and calculating the initial position l i of the target i to be positioned by using a two-node relative positioning algorithm based on the base station;
s5) calculating a position compensation vector based on the initial position l i of the target i to be positioned, and the calculated distance d' i,j between the node i to be positioned and the positioned node j
Wherein, Is a unit vector pointing to a positioned adjacent node j from a target i to be positioned, and u j is a trust value of the positioned node j;
S6) searching for the position compensation coefficient beta along the position compensation vector by using the golden section method The initial position l i of the target to be positioned is moved in the direction to obtain the compensated position coordinateCalculating a position compensation vector of the object to be positioned using the formula of step S5)
S7) setting a threshold thr, and compensating the position of the target to be positioned by using the position compensation vectorComparison with a threshold thr:
If it is To be used forInstead of position compensation vectorsTo compensate for the positionInstead of the initial position l i, returning to step S6);
If it is Then the compensated coordinates are determinedIs the position of the object i to be positioned.
The invention provides a positioning scheme of an indoor cluster target, which solves the problem that the existing method cannot determine the optimal virtual ground by selecting a positioned node as a virtual base station through a node trust value, and simultaneously, iteratively compensates a positioning result based on the node trust value, reduces the accumulated error existing in multi-hop positioning and improves the cluster positioning precision.
Detailed description of the preferred embodiments
Embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, the indoor cluster target positioning method of the present example includes the following implementation steps:
Step 1, obtaining ranging information and self-moving information of all nodes in the cluster.
The distance measurement information is obtained by carrying out multiple communication on any node i in the cluster and all adjacent nodes j in the sight distance range of the node i, and recording the flight time of a wireless signal and multiplying the light speed to obtain a measurement distance delta i,j;
The self-movement information is the accurate movement track of all nodes in a short period, including the movement direction beta and the movement distance n, measured by an inertial navigation system.
And 2, determining a target to be positioned.
For the nodes adjacent to the base station in the cluster, the existing positioning algorithm can be used for determining the position coordinates of the nodes, but for the nodes not adjacent to the base station, namely the non-positioning nodes, the non-positioning nodes cannot be positioned through the existing positioning algorithm, so that the non-positioning nodes are firstly ordered according to the hop count from the base station to be large, and then one non-positioning node with the smallest hop count from the base station is selected at will as a target to be positioned.
And 3, calculating a trust value u i of each located node based on the position coordinates of the located node.
3.1 Calculating the distance d i,j between the positioned node i and the positioned adjacent node j according to the positioning coordinates:
Wherein, (x i,yi) is the position coordinate of the located node i, (x j,yj) is the position coordinate of the located node j;
3.2 According to the calculated distance d i,j between the positioned node i and the positioned adjacent node j, calculating the temporary quantity xi:
Wherein R i={ri,1,ri,2,...,ri,j,...ri,K is a set formed by adjacent nodes of the positioned node i, R i,j is the j-th adjacent node of the node i, K is the number of adjacent nodes of the positioned node i, delta i,j is the measured distance between the positioned node i and the positioned node j, mui is the m-th historical trust value of the positioned node i, and the upper limit tau of m is 4-5;
3.3 Adjusting the weight parameter alpha occupied by the historical trust value in the current trust value according to the temporary quantity xi:
3.4 Calculating the trust value of the positioned node i according to the weight parameter alpha occupied by the historical trust value in the current trust value:
Wherein d i,j is the calculated distance between the located node i and the located node j obtained according to the location coordinates.
And 4, calculating an initial position l i of the target i to be positioned based on a two-node relative positioning algorithm.
The existing method for calculating the initial position l i of the target i to be positioned comprises a two-node relative positioning algorithm, a TOA algorithm, a TDOA algorithm, an AOA algorithm and the like. The present example uses, but is not limited to, a two-node relative positioning algorithm to calculate the initial position l i of the target i to be positioned, and specifically implements the following:
4.1 Taking all the positioned nodes as virtual base stations, selecting a base station A with the largest trust value and capable of covering a target to be positioned, enabling the position coordinate of the base station A to be (x A,yA), enabling the time point of the last three ranging of the base station A and the target i to be positioned to be t 1、t2、t3 from first to last, and enabling the three ranging results to be d 1、d2、d3 in sequence;
4.2 Let the self-moving direction of the target i to be positioned measured at time t 2 be beta 2 and the moving distance be n 2, let the self-moving direction of the target i to be positioned measured at time t 3 be beta 3 and the moving distance be n 3;
4.3 According to the measured distance between the base station A and the target i to be positioned at the moment t 1、t2 in the step 4.1) and the self-moving direction beta 2 and the moving distance n 2 of the target i to be positioned measured at the moment t 2 in the step 4.2), constructing the following equation set:
Wherein, (x i,yi) is the position coordinate of the target i to be positioned which needs to be solved;
4.4 Solving the equation set, and determining the initial position l i of the target i to be positioned according to the solving result:
if the equation set has no solution, the target i cannot be positioned, and the step 4.1 is returned to when the distance is measured next time;
If the equation set has only one set of solutions, determining the set of solutions as the initial position l i of the target i to be positioned;
if the equation set has two solutions, executing the step 4.5);
4.5 From the two solutions of the above equation set, one of the solutions is selected as the initial position l i of the node i to be located.
4.5.1 Let the two solutions of the equation set be respectivelyCalculating the calculated distance between the base station A and the target i to be positioned at the moment t 3 according to the position coordinate (x A,yA) of the base station A
4.5.2 Calculating the calculated distance between the base station A and the target i to be positioned at time t 3 corresponding to the two solutionsThe difference from the measured distance d 3 is that one set of solutions is selected as the initial position l i of the node i to be located according to the following rule:
If it is Then it is determined thatAn initial position l i for the object i to be positioned;
If it is Then it is determined thatIs the initial position l i of the object i to be positioned.
Step 5, calculating a position compensation vector based on the initial position l i of the object i to be positioned
5.1 Based on the initial position l i of the object i to be positioned, calculating the distance d i',j between the node i to be positioned and the positioned node j:
wherein, (x i',yi') is the initial position l i coordinate of the object i to be positioned, and (x j,yj) is the position coordinate of the positioned node j;
5.2 Based on the initial position l i of the object i to be positioned, calculating a unit vector pointing from the initial position of the object i to be positioned to the positioned node j
5.3 According to the calculated distance d i',j between the node i to be positioned and the node j to be positioned, the unit vector pointing from the target i to be positioned to the node j to be positionedCalculating a position compensation vector
Where u j is the trust value of the located node j and delta i,j is the measured distance between the node i to be located and the located node j.
Step 6, searching the position compensation coefficient beta, combining the position compensation coefficient beta and the position compensation vectorCalculating the position coordinates of the nodes to be positioned after compensationAnd calculates the node to be positioned atPosition compensation vector at
6.1 Using the existing golden section method in the range of [0,8], the position compensation vector at initial position l i along the node to be locatedDirection, search for the position compensation coefficient β;
6.2 Based on the position compensation coefficient beta, the position compensation vector of the node to be positioned at the initial position l i Moving the initial position l i of the target to be positioned to obtain compensated position coordinates
6.3 Make the compensated position coordinatesAccording toCalculating the distance between the node i to be positioned and the positioned node j after position compensation
Wherein, (x j,yj) is the position coordinate of the located node j;
6.4 To make the position coordinates of the node to be positioned after compensation According toCalculating the compensated position from the node i to be positionedUnit vector pointing to located node j
6.5 According to the calculated distance between the node i to be positioned and the positioned node jCalculating the position of the node to be positioned after compensationPosition compensation vector at
Step 7, based on the position of the node to be positioned after compensationPosition compensation vector atThe position of the object i to be located is determined.
Setting a position compensation threshold thr epsilon (0, 1), and carrying out position compensation on a position compensation vector of a target to be positioned after position compensationComparison with a threshold thr:
If it is Then toInstead of position compensation vectorsTo compensate for the positionInstead of the initial position l i, returning to step S6);
If it is Then the compensated coordinates are determinedIs the position of the object i to be positioned.
The above description is only one specific example of the invention and does not constitute any limitation of the invention, and it will be apparent to those skilled in the art that various modifications and changes in form and details may be made without departing from the principles, construction of the invention, but these modifications and changes based on the idea of the invention are still within the scope of the claims of the invention.