Summary of the invention
In order to solve the problem of prior art, the embodiment of the present invention provides a kind of method and device of location node.Described technical scheme is as follows:
On the one hand, provide a kind of method of location node, described method comprises:
Receive the signal that a plurality of base stations send, according to the signal received, obtain each road non line of sight of node to be positioned;
According to each road non line of sight of each calibration point of storing in each road non line of sight of described node to be positioned and database, from described database, select calibration point;
According to each road non line of sight of each calibration point of selecting and each road non line of sight of described node to be positioned, calculate respectively the weights of each road non line of sight of each calibration point of described selection;
According to the weights of each road non line of sight of each calibration point of each road non line of sight of each calibration point of each road sighting distance of each calibration point of described selection, described selection and described selection, calculate respectively each road non line of sight error of described node to be positioned;
According to each road non line of sight error of described node to be positioned and each road non line of sight of described node to be positioned, calculate the coordinate of described node to be positioned.
Wherein, each road non line of sight of each calibration point of storing in described each road non line of sight according to described node to be positioned and database is selected calibration point from described database, comprising:
Each road non line of sight according to each calibration point of storing in each road non line of sight of described node to be positioned and database, calculate the Euclidean distance between each calibration point of storing in described node to be positioned and described database;
A default value school punctuate of the Euclidean distance minimum between selection and described node to be positioned;
According to a default value school punctuate of selecting and the Euclidean distance between described node to be positioned, a described default value school punctuate is screened, the school punctuate filtered out is defined as to the calibration point of selecting from described database.
Further, each road non line of sight of described each calibration point according to selecting and each road non line of sight of described node to be positioned, calculate respectively the weights of each road non line of sight of each calibration point of described selection, comprising:
According to each calibration point of selecting and the Euclidean distance between described node to be positioned, calculate respectively the weights of each calibration point of described selection;
According to each road non line of sight of each calibration point of described selection and each road non line of sight of described node to be positioned, calculate respectively described selection each calibration point each road non line of sight shared weights in the road non line of sight that selectively calibration point is corresponding;
According to each road non line of sight of each calibration point of described selection the weights of each calibration point of shared weights and described selection in the road non line of sight that selectively calibration point is corresponding, calculate respectively the weights of each road non line of sight of each calibration point of described selection.
Wherein, the weights of each road non line of sight of each road non line of sight of each calibration point of each road sighting distance of described each calibration point according to described selection, described selection and each calibration point of described selection, calculate respectively each road non line of sight error of described node to be positioned, comprising:
According to each road non line of sight of each calibration point of each road sighting distance of each calibration point of described selection and described selection, calculate respectively each road non line of sight error of each calibration point of described selection;
According to the weights of each road non line of sight of each calibration point of each road non line of sight error of each calibration point of described selection and described selection, calculate respectively each road non line of sight error of described node to be positioned.
Wherein, described according to each road non line of sight error of described node to be positioned and each road non line of sight of described node to be positioned, calculate the coordinate of described node to be positioned, comprising:
According to each road non line of sight error of described node to be positioned and each road non line of sight of described node to be positioned, calculate each road sighting distance of described node to be positioned;
According to the coordinate of at least one calibration point in the calibration point of the coordinate of each road sighting distance of described node to be positioned, described a plurality of base stations and selection, calculate the coordinate of described node to be positioned.
On the other hand, provide a kind of device of location node, described device comprises:
Receiver module, the signal sent for receiving a plurality of base stations, according to the signal received, obtain each road non line of sight of node to be positioned;
Select module, each road non line of sight of each calibration point of storing for each road non line of sight and database according to described node to be positioned is selected calibration point from described database;
The first computing module, for each road non line of sight of each calibration point according to selecting and each road non line of sight of described node to be positioned, calculate respectively the weights of each road non line of sight of each calibration point of described selection;
The second computing module, for the weights of each road non line of sight of each calibration point of each road non line of sight of each calibration point of each the road sighting distance according to each calibration point of described selection, described selection and described selection, calculate respectively each road non line of sight error of described node to be positioned;
The 3rd computing module, for each road non line of sight of each the road non line of sight error according to described node to be positioned and described node to be positioned, calculate the coordinate of described node to be positioned.
Wherein, described selection module comprises:
The first computing unit, each road non line of sight of each calibration point of storing for each road non line of sight and database according to described node to be positioned, calculate the Euclidean distance between each calibration point of storing in described node to be positioned and described database;
Selected cell, for a default value school punctuate of the Euclidean distance minimum between selection and described node to be positioned;
Determination module, for the default value school punctuate according to selecting and the Euclidean distance between described node to be positioned, screened a described default value school punctuate, and the school punctuate filtered out is defined as to the calibration point of selecting from described database.
Further, described the first computing module comprises:
The second computing unit, for each calibration point according to selecting and the Euclidean distance between described node to be positioned, calculate respectively the weights of each calibration point of described selection;
The 3rd computing unit, for each the road non line of sight according to each calibration point of described selection and each road non line of sight of described node to be positioned, calculate respectively shared weights in the road non line of sight that each road non line of sight of each calibration point of described selection is corresponding at the selectable calibration point of institute;
The 4th computing unit, the weights of each calibration point of the shared weights of a road non line of sight corresponding at the selectable calibration point of institute and described selection for each the road non line of sight according to each calibration point of described selection, calculate respectively the weights of each road non line of sight of each calibration point of described selection.
Wherein, described the second computing module comprises:
The 5th computing unit, for each road non line of sight of each calibration point of each road sighting distance of each calibration point according to described selection and described selection, calculate respectively each road non line of sight error of each calibration point of described selection;
The 6th computing unit, for the weights of each road non line of sight of each calibration point of each road non line of sight error of each calibration point according to described selection and described selection, calculate respectively each road non line of sight error of described node to be positioned.
Wherein, described the 3rd computing module comprises:
The 7th computing unit, for each road non line of sight of each the road non line of sight error according to described node to be positioned and described node to be positioned, calculate each road sighting distance of described node to be positioned;
The 8th computing unit, for the coordinate of at least one calibration point of the calibration point of the coordinate according to each road sighting distance of described node to be positioned, described a plurality of base stations and selection, calculate the coordinate of described node to be positioned.
In embodiments of the present invention, need not arrange too many calibration point in each geographic area, the signal that the calibration point that only need arrange in this geographic area can receive at least three base stations transmissions gets final product, make each road non line of sight of the calibration point stored in database less, when treating location node and position, select again calibration point in the calibration point of storing from database, because the calibration point of storing in database is originally just less, the calibration point of now selecting from database can be still less, so calculate the coordinate time of node to be positioned according to each road non line of sight of each road non line of sight of the calibration point of selecting and node to be positioned, reduced the complexity of calculating, improved the efficiency of location node.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment mono-
The embodiment of the present invention provides a kind of method of location node, and referring to Fig. 1, the method comprises:
Step 101: receive the signal that a plurality of base stations send, according to the signal received, obtain each road non line of sight of node to be positioned;
Step 102: according to each road non line of sight of each calibration point of storing in each road non line of sight of node to be positioned and database, from this database, select calibration point;
Step 103: according to each road non line of sight of each calibration point of selecting and each road non line of sight of node to be positioned, calculate respectively the weights of each road non line of sight of each calibration point of selecting;
Step 104: according to the weights of each road non line of sight of each calibration point of each road non line of sight of each calibration point of each road sighting distance of each calibration point of selecting, selection and selection, calculate respectively each road non line of sight error of node to be positioned;
Step 105: according to each road non line of sight error of node to be positioned and each road non line of sight of node to be positioned, calculate the coordinate of node to be positioned.
Wherein, according to each road non line of sight of each calibration point of storing in each road non line of sight of node to be positioned and database, from this database, select calibration point, comprising:
Each road non line of sight according to each calibration point of storing in each road non line of sight of node to be positioned and database, calculate the Euclidean distance between each calibration point of storing in node to be positioned and this database;
A default value school punctuate of the Euclidean distance minimum between selection and node to be positioned;
According to a default value school punctuate of selecting and the Euclidean distance between node to be positioned, this default value school punctuate is screened, the school punctuate filtered out is defined as to the calibration point of selecting from this database.
Further, according to each road non line of sight of each calibration point of selecting and each road non line of sight of node to be positioned, calculate respectively the weights of each road non line of sight of each calibration point of selecting, comprising:
According to each calibration point of selecting and the Euclidean distance between node to be positioned, calculate respectively the weights of each calibration point of selecting;
According to each road non line of sight of each calibration point of selecting and each road non line of sight of node to be positioned, calculate respectively shared weights in the road non line of sight that each road non line of sight of each calibration point of selecting is corresponding at the selectable calibration point of institute;
According to the weights of each road non line of sight of each calibration point of selecting each calibration point of shared weights and selection in institute's road non line of sight that selectively calibration point is corresponding, calculate respectively the weights of each road non line of sight of each calibration point of selection.
Wherein, according to the weights of each road non line of sight of each calibration point of each road non line of sight of each calibration point of each road sighting distance of each calibration point of selecting, selection and selection, calculate respectively each road non line of sight error of node to be positioned, comprising:
According to each road non line of sight of each calibration point of each road sighting distance of each calibration point of selecting and selection, calculate respectively each road non line of sight error of each calibration point of selecting;
According to the weights of each road non line of sight of each calibration point of each road non line of sight error of each calibration point of selecting and selection, calculate respectively each road non line of sight error of node to be positioned.
Wherein, according to each road non line of sight error of node to be positioned and each road non line of sight of node to be positioned, calculate the coordinate of node to be positioned, comprising:
According to each road non line of sight error of node to be positioned and each road non line of sight of node to be positioned, calculate each road sighting distance of node to be positioned;
According to the coordinate of at least one calibration point in the calibration point of the coordinate of each road sighting distance of node to be positioned, the plurality of base station and selection, calculate the coordinate of node to be positioned.
In embodiments of the present invention, need not arrange too many calibration point in each geographic area, the signal that the calibration point that only need arrange in this geographic area can receive at least three base stations transmissions gets final product, make each road non line of sight of the calibration point stored in database less, when treating location node and position, select again calibration point in the calibration point of storing from database, because the calibration point of storing in database is originally just less, the calibration point of now selecting from database can be still less, so calculate the coordinate time of node to be positioned according to each road non line of sight of each road non line of sight of the calibration point of selecting and node to be positioned, reduced the complexity of calculating, improved the efficiency of location node.
Embodiment bis-
The embodiment of the present invention provides a kind of method of location node, and referring to Fig. 2, the method comprises:
Step 201: node to be positioned receives the signal that a plurality of base stations send, each road non line of sight of the signal acquisition node to be positioned sent according to the plurality of base station;
Wherein, a plurality of base stations are base stations that node to be positioned can receive signal, and adopt in embodiments of the present invention the TDOA location technology, so a plurality of base stations are at least two base stations, if, node to be positioned can receive the signal that s base station sends, and the way of the non line of sight that node to be positioned comprises is
, s is more than or equal to 2.
Particularly, node to be positioned receives the signal that a plurality of base stations send, obtain base station that the plurality of signal is corresponding from it time to node to be positioned, the plurality of time is subtracted each other in twos, obtain each road non line of sight TDOA(Time Difference of Arrival of node to be positioned, reach the time difference), each road non line of sight TDOA and the light velocity of node to be positioned are multiplied each other, obtain each road non line of sight of node to be positioned.
For example, node to be positioned can receive the signal that 4 base stations send, the way of the non line of sight that node to be positioned comprises is 6 tunnels, if the time of signal from the 1st base station to node to be positioned of the 1st base station transmission is 2s, the time of signal from the 2nd base station to node to be positioned of the 2nd base station transmission is 3s, the time of signal from the 3rd base station to node to be positioned of the 3rd base station transmission is 2.5s, the time of signal from the 4th base station to node to be positioned of the 4th base station transmission is 4s, by 2s, 3s, 2.5s with 4s subtracts each other in twos, obtain 6 road non line of sight TDOA and be respectively 1s, 0.5s, 2s, 0.5s, 1s and 1.5s, this 6 road non line of sight TDOA is multiplied each other with the light velocity respectively, obtain 6 road non line of sight of node to be positioned.
Step 202: each the road non line of sight according to each calibration point of storing in each road non line of sight of node to be positioned and database, calculate the Euclidean distance between each calibration point of storing in node to be positioned and database;
Particularly, each the road non line of sight according to each calibration point of storing in each road non line of sight of node to be positioned and database, calculate respectively the Euclidean distance between each calibration point of storing in node to be positioned and database according to following formula (1);
Wherein, in above-mentioned formula (1), the way that n is non line of sight, Nlosf, i, jbe the j road non line of sight of i calibration point, Nlosp,jfor the j road non line of sight of node to be positioned, EucDisiit is the Euclidean distance between i calibration point and node to be positioned.
Each calibration point wherein, adopts in embodiments of the present invention the TDOA location technology, so at least can receive the signal that two base stations send.If certain calibration point can receive the signal that m base station sends, the way of the non line of sight that now this calibration point comprises is
the time that this m base station is arrived to this calibration point subtracts each other in twos, obtains this calibration point
the road non line of sight, m is more than or equal to 2.
Wherein, Euclidean distance between certain calibration point and node to be positioned hour, determine between this calibration point and node to be positioned geographically apart from being also minimum, correspondingly, when the Euclidean distance between certain calibration point and node to be positioned is maximum, determine between this calibration point and node to be positioned geographically apart from being also maximum.
Step 203: according to the Euclidean distance between each calibration point of storing in database and node to be positioned, select calibration point from database;
Particularly, this step can be divided into the step of (1)-(3) as follows, comprising:
(1), according to the Euclidean distance between each calibration point of storing in database and node to be positioned, select and node to be positioned between the default value calibration point of Euclidean distance minimum;
Preferably, can select and node to be positioned between three calibration points of Euclidean distance minimum.
(2), according to a default value calibration point of selecting and the Euclidean distance between node to be positioned, the default value calibration point of selection is screened;
Wherein, for convenience's sake, will and node to be positioned between the calibration point of Euclidean distance minimum be called the first calibration point, the calibration point of other except the first calibration point in default several value calibration points is called to the second calibration point.
Particularly, by the Euclidean distance between the second calibration point and node to be positioned respectively divided by the Euclidean distance between the first calibration point and node to be positioned, obtain the first numerical value, the first numerical value and default thresholding are compared, if this first numerical value is greater than default thresholding, give up this second calibration point, if this first numerical value is less than or equal to default thresholding, retain this second calibration point.
Wherein, default thresholding is greater than 1.
(3) calibration point that, the calibration point after screening is defined as selecting from database.
Particularly, the calibration point that the second calibration point of finally retaining and the first calibration point is defined as selecting from database.
Step 204: according to each calibration point of selecting and the Euclidean distance between node to be positioned, calculate respectively the weights of each calibration point of selecting;
Particularly, according to each calibration point of selecting and the Euclidean distance between node to be positioned, calculate respectively the weights of each calibration point of selecting according to following formula (2);
Wherein, in above-mentioned formula (2), Wibe the weights of i calibration point, the number that k is the calibration point selected from database, when k is 1, Wibe 1.
Wherein, the weights sum of each calibration point of selection is 1.
Wherein, when the number of the calibration point of selecting is 1, the weights of the calibration point of this selection are 1.
Step 205: according to each road non line of sight of each calibration point of selecting and each road non line of sight of node to be positioned, calculate respectively shared weights in the road non line of sight that each road non line of sight of each calibration point of selecting is corresponding at the selectable calibration point of institute;
Particularly, according to each road non line of sight of each calibration point of selecting and each road non line of sight of node to be positioned, each the road non line of sight that calculates respectively each calibration point of selecting according to following formula (3) shared weights in a road non line of sight corresponding to selectable calibration point;
Wherein, in above-mentioned formula (3), Wi,jbe i calibration point j road non line of sight shared weights in the j road non line of sight that selectively calibration point is corresponding, when k is 1, Wi,jbe 1.
Wherein, selectively the j road non line of sight sum of calibration point be 1.
If, select 2 calibration points, and each calibration point comprises 6 road non line of sight, this step is calculated is the 1st road non line of sight shared weights in the 1st road non line of sight of the 1st road non line of sight of the 1st calibration point and the 2nd calibration point of the 1st calibration point, the 2nd road non line of sight of the 1st calibration point is shared weights in the 2nd road non line of sight of the 2nd road non line of sight of the 1st calibration point and the 2nd calibration point, the 1st road non line of sight of the 2nd calibration point is shared weights in the 1st road non line of sight of the 1st road non line of sight of the 1st calibration point and the 2nd calibration point, the 2nd road non line of sight of the 2nd calibration point is shared weights in the 2nd road non line of sight of the 2nd road non line of sight of the 1st calibration point and the 2nd calibration point.
Step 206: according to the weights of each road non line of sight of each calibration point of selecting each calibration point of shared weights and selection in institute's road non line of sight that selectively calibration point is corresponding, calculate respectively the weights of each road non line of sight of each calibration point of selection;
Particularly, according to the weights of each road non line of sight of each calibration point of selecting each calibration point of shared weights and selection in institute's road non line of sight that selectively calibration point is corresponding, calculate respectively the weights of each road non line of sight of each calibration point of selection according to following formula (4);
Wherein, in above-mentioned formula (4), W'i,jbe the weights of the j road non line of sight of i calibration point.
The weights sum of each road non line of sight that wherein, each calibration point comprises is 1.
Step 207: according to each road non line of sight of each calibration point of each road sighting distance of each calibration point of selecting and selection, calculate respectively each road non line of sight error of each calibration point of selecting;
Particularly, obtain each road sighting distance of each calibration point of selection, each road sighting distance of each calibration point of selection is deducted to a road non line of sight of its correspondence, obtain each road non line of sight error of each calibration point of selection.
Wherein, the concrete operations of each road sighting distance of obtaining each calibration point of selection are: the coordinate that according to coordinate and each calibration point of each calibration point of selecting, can receive the base station of signal, calculate each road sighting distance of each calibration point of selecting according to following formula (5);
Wherein, in above-mentioned formula (5), Losf, i, jbe the j road sighting distance of i calibration point, (Xs, Ys, Zs) and (Xa, Ya, Za) coordinate of the base station that can receive for calibration point i, the coordinate that (x, y, z) is calibration point i.
Step 208: according to the weights of each road non line of sight of each calibration point of each road non line of sight error of each calibration point of selecting and selection, calculate respectively each road non line of sight error of node to be positioned;
Particularly, according to the weights of each road non line of sight of each calibration point of each road non line of sight error of each calibration point of selecting and selection, calculate respectively each road non line of sight error of node to be positioned according to following formula (6);
Wherein, in above-mentioned formula (6), NlosErrorp,jfor the j road non line of sight error of node to be positioned, NlosErrorf, i, jj road non line of sight error for i calibration point selecting.
Step 209: according to each road non line of sight error of node to be positioned and each road non line of sight of node to be positioned, calculate each road sighting distance of node to be positioned;
Particularly, the road non line of sight addition corresponding with node to be positioned by each road non line of sight error of node to be positioned, obtain each road sighting distance of node to be positioned.
Step 210: according to the coordinate of at least one calibration point in the calibration point of the coordinate of each road sighting distance of node to be positioned, the plurality of base station and selection, calculate the coordinate of node to be positioned.
Particularly, according to the coordinate of each road sighting distance of node to be positioned, the plurality of base station and the coordinate of node to be positioned, set up equation group, the coordinate by the initial value assignment of node coordinate to be positioned for a calibration point in the calibration point of selecting, used Newton iteration method to obtain the coordinate of node to be positioned.
Preferably, can by and node to be positioned between the coordinate assignment of calibration point of Euclidean distance minimum give the initial value of node coordinate to be positioned.
In embodiments of the present invention, need not arrange too many calibration point in each geographic area, the signal that the calibration point that only need arrange in this geographic area can receive at least three base stations transmissions gets final product, make each road non line of sight of the calibration point stored in database less, when treating location node and position, select again calibration point in the calibration point of storing from database, because the calibration point of storing in database is originally just less, the calibration point of now selecting from database can be still less, so calculate the coordinate time of node to be positioned according to each road non line of sight of each road non line of sight of the calibration point of selecting and node to be positioned, reduced the complexity of calculating, improved the efficiency of location node.
Embodiment tri-
Referring to Fig. 3, the embodiment of the present invention provides a kind of device of location node, and this device comprises:
Receiver module 301, the signal sent for receiving a plurality of base stations, according to the signal received, obtain each road non line of sight of node to be positioned;
Select module 302, each road non line of sight of each calibration point of storing for each road non line of sight and database according to node to be positioned is selected calibration point from database;
Thefirst computing module 303, for each road non line of sight of each calibration point according to selecting and each road non line of sight of node to be positioned, calculate respectively the weights of each road non line of sight of each calibration point of selecting;
Thesecond computing module 304, for the weights of each road non line of sight of each calibration point of each road non line of sight of each calibration point of each the road sighting distance of each calibration point according to selecting, selection and selection, calculate respectively each road non line of sight error of node to be positioned;
The3rd computing module 305, for each road non line of sight of each the road non line of sight error according to node to be positioned and node to be positioned, calculate the coordinate of node to be positioned.
Wherein,select module 302 to comprise:
The first computing unit, each road non line of sight of each calibration point of storing for each road non line of sight and database according to node to be positioned, calculate the Euclidean distance between each calibration point of storing in node to be positioned and this database;
Selected cell, for a default value school punctuate of the Euclidean distance minimum between selection and node to be positioned;
Determination module, for the default value school punctuate according to selecting and the Euclidean distance between node to be positioned, screened a default value school punctuate, and the school punctuate filtered out is defined as to the calibration point of selecting from this database.
Further, thefirst computing module 303 comprises:
The second computing unit, for each calibration point according to selecting and the Euclidean distance between node to be positioned, calculate respectively the weights of each calibration point of selecting;
The 3rd computing unit, for each road non line of sight of each calibration point according to selecting and each road non line of sight of node to be positioned, calculate respectively shared weights in the road non line of sight that each road non line of sight of each calibration point of selecting is corresponding at the selectable calibration point of institute;
The 4th computing unit, the weights of each calibration point of weights shared at institute's road non line of sight that selectively calibration point is corresponding and selection for each road non line of sight of each calibration point according to selecting, calculate respectively the weights of each road non line of sight of each calibration point of selection.
Wherein, thesecond computing module 304 comprises:
The 5th computing unit, for each road non line of sight of each calibration point of each the road sighting distance of each calibration point according to selecting and selection, calculate respectively each road non line of sight error of each calibration point of selecting;
The 6th computing unit, for the weights of each road non line of sight of each calibration point of each the road non line of sight error of each calibration point according to selecting and selection, calculate respectively each road non line of sight error of node to be positioned.
Wherein, the3rd computing module 305 comprises:
The 7th computing unit, for each road non line of sight of each the road non line of sight error according to node to be positioned and node to be positioned, calculate each road sighting distance of node to be positioned;
The 8th computing unit, for the coordinate of at least one calibration point of the calibration point of the coordinate according to each road sighting distance of node to be positioned, the plurality of base station and selection, calculate the coordinate of node to be positioned.
In embodiments of the present invention, need not arrange too many calibration point in each geographic area, the signal that the calibration point that only need arrange in this geographic area can receive at least three base stations transmissions gets final product, make each road non line of sight of the calibration point stored in database less, when treating location node and position, select again calibration point in the calibration point of storing from database, because the calibration point of storing in database is originally just less, the calibration point of now selecting from database can be still less, so calculate the coordinate time of node to be positioned according to each road non line of sight of each road non line of sight of the calibration point of selecting and node to be positioned, reduced the complexity of calculating, improved the efficiency of location node.
It should be noted that: the device of the location node that above-described embodiment provides is when location node, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, the internal structure that is about to device is divided into different functional modules, to complete all or part of function described above.In addition, the device of the location node that above-described embodiment provides and the embodiment of the method for location node belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.