Summary of the invention
Goal of the invention: it aiming at the problem that present invention positioning accuracy present in the background technique, proposes and a kind of is calculated based on SVM
The error compensation algorithm of the UWB indoor positioning of method, solves indoor nlos environment to a certain extent and brings to positioning result
Influence, improve the precision of positioning.
Technical solution:
A kind of UWB indoor position error elimination algorithm based on support vector machines, comprising steps of
(1) it sets the number of reference base station and participates in the number of locating base station;
(2) Primary Location is carried out using TDOA algorithm, specifically: the random position for generating reference base station position and target BS
It sets, sets IEEE UWB indoor channel relevant parameter, a variety of positioning groups are generated according to the number for the reference base station for participating in positioning
Merge and different calculation methods is selected to obtain positioning result, if number is 3, using the method for solving Hyperbolic Equation;Such as
Fruit number is greater than 3, then uses least-squares estimation;
(3) non-market value identification is carried out;Include the following steps:
(31) each bit combination is calculated using the Primary Location result that algorithm of support vector machine obtains step (2)
Residual error, and carry out the classification of first time to obtained residual error: first sorting to each combined residual error being calculated, then select
First three lesser residual error of first three biggish residual sum out, using this six residual errors as training data using support vector machines into
Row training, finally classifies to remaining data using the model trained;
The calculation formula of the residual epsilon is:
Wherein, (xi,yi) it is i-th kind of bit combination as a result, (x, y) is the coordinate of target BS.
(32) the first subseries obtains in the step (31) residual error is biggish as a result, residual analysis is utilized to adjudicate method
The second subseries is carried out, i.e., is assigned to reference base station for residual error as weight, weight equation is
Wherein, wkFor the weight of k-th of reference base station, εiFor the residual error of i-th kind of bit combination, MkFor k-th of reference base station
Participate in the combined quantity of positioning;
The base station of weight larger (weight > 0) is selected as secondary classification results, i.e., with the ginseng of nlos environment
Examine base station;
(4) error concealment for carrying out nlos environment obtains final positioning result, specifically:
(41) secondary TDOA is carried out using the reference base station with nlos environment environment that step (3) obtains to determine
Position, it is assumed that bit combination has m kind;
(42) residual error of m kind bit combination is calculated, and residual error is normalized, residual error normalizes formula are as follows:
Wherein,The normalization residual values combined for i-th kind, εiThe residual values combined for i-th kind.
(43) positioning result is weighted using the normalization residual values that step (42) are calculated, weighted formula are as follows:
Wherein,The normalization residual values combined for i-th kind, (xe,ye) be nlos environment under positioning result, (xi,
yi) be i-th kind of integrated positioning result;
(44) positioning result under nlos environment is averaged with the positioning result there is no nlos environment, is obtained most
Whole positioning result.
The step (2) specifically:
(21) position of N number of reference base station and 1 target BS is randomly generated;
(22) it chooses K base station from N number of reference base station to be positioned, K >=3;
(23) if K=3, (24) are thened follow the steps;
(24) assume that three base stations chosen are respectively BS1, BS2 and BS3, by target BS to reference base station BS1 and
BS2 emits signal, obtains target BS to the time difference between two reference base stations, to obtain range difference, determines the target
Base station is centainly in using the two reference base stations as on the hyperbola of focus, and lists an equation about target position;Together
Reason obtains another equation by reference to base station BS 1 and BS3, finally obtains equation group:
Wherein, (x, y) is the coordinate of target BS;(x1,y1), (x2,y2), (x3,y3) be respectively reference base station BS1,
The coordinate of BS2, BS3;R1, r2, r3 are distance of the target BS to three reference base stations respectively;T1, t2, t3 are target base respectively
Station transmits a signal to the time of three reference base stations;C is the light velocity;
The position of target BS is determined by solving equations;
(25) it if K > 3, executes step (26);
(26) it copies step (24) to obtain Hyperbolic Equation, and Hyperbolic Equation is write as to the form of matrix, then utilize
Least-squares estimation solves to obtain the position of target BS.
It further include verification step, specifically: the average value for calculating TDOA algorithm first time positioning result disappears as error
Positioning result before removing, under positioning result and view distance environment that error is eliminated under the nlos environment obtained using step (3)
Positioning result takes the average positioning result as after error concealment, the residual error before residual error and error concealment after calculating error concealment
Ratio the correctness of algorithm verified.
The utility model has the advantages that the present invention is calculated using support vector machines with the NLOS error concealment that residual analysis judgement method combines
Method identifies classification by error twice, can more accurately identify NLOS environment, to preferably eliminate error, mentions
The precision of height positioning.The NLOS error compensation algorithm of invention has very important finger to UWB indoor positioning in real life
Lead effect.
Specific embodiment
In the following with reference to the drawings and specific embodiments, the present invention is furture elucidated.
With reference to Fig. 1, the present invention is based on the UWB indoor position error elimination algorithms of support vector machines (SVM) to residual error point
Analysis decision method improves, i.e., combines SVM algorithm with residual analysis decision method, can eliminate non-view to a certain extent
It is influenced away from bring, improves the precision of positioning;Implement step are as follows:
(1) it sets the number of reference base station and participates in the number of locating base station;
(2) TDOA algorithmic preliminaries position;The algorithm requires to reduce, especially suitable for super compared to TOA algorithm to synchronous
Broadband indoor positioning.TDOA algorithm sends signal to fixed base stations by mobile station, calculates signal and reaches two fixed base stations
Time difference obtains range difference using spread speed (light velocity), therefore mobile station is at using the two base stations as focus
On hyperbola, the position of mobile station can be determined by solving an equation group in this way;Specifically: it is random to generate reference base station position
With the position of target BS, IEEE UWB indoor channel relevant parameter is set, according to the number meeting for the reference base station for participating in positioning
It generates a variety of bit combinations and needs that different calculation methods is selected to obtain positioning result, it is double using solving if number is 3
The method of curvilinear equation;If number is greater than 3, using least-squares estimation;
Including the following steps:
(21) position of N number of reference base station (anchor point) and 1 target BS (anchor point) is randomly generated;
(22) K (K >=3) a base station is chosen from N number of reference base station to be positioned;
(23) it if K=3, executes step (24);
(24) assume that three base stations chosen are respectively BS1, BS2 and BS3, by target BS to reference base station BS1 and
BS2 emits signal, and available target BS to the time difference between two reference base stations in this way may be used to obtain range difference
To determine that the target BS is centainly in using the two reference base stations as on the hyperbola of focus, it is related to that we can be with by this
An equation about target position is listed, similarly we can obtain another equation by reference to base station BS 1 and BS3, this
Sample we just obtained an equation group:
Wherein, (x, y) is the coordinate of target BS;(x1,y1), (x2,y2), (x3,y3) be respectively reference base station BS1,
The coordinate of BS2, BS3;R1, r2, r3 are distance of the target BS to three reference base stations respectively;T1, t2, t3 are target base respectively
Station transmits a signal to the time of three reference base stations;C is the light velocity, and the position of target can be determined by solving equations;
(25) it if K > 3, executes step (26);
(26) it copies step (24) to obtain Hyperbolic Equation, and these Hyperbolic Equations is write as to the form of matrix, then
It solves to obtain the position of target BS using least-squares estimation;
(3) non-market value identification is carried out;Include the following steps:
(31) it is carried out for the first time using the residual error that the Primary Location result that algorithm of support vector machine obtains step (2) obtains
Classification, be broadly divided into two classes, i.e. the biggish a kind of and lesser one kind of residual error of residual error, concrete methods of realizing is first to give residual error row
Then sequence selects first three lesser residual error of first three biggish residual sum, be trained using this six numbers as training data,
Finally classified using the model trained to remaining data.
The calculation formula of residual epsilon is:
Wherein, (xi,yi) it is i-th kind of integrated positioning as a result, (x, y) is the coordinate of target BS.
(32) residual error obtained the first subseries is biggish as a result, carrying out second point using residual analysis judgement method
Class, i.e., be assigned to reference base station for residual error as weight, and weight equation is
Wherein, wkFor the weight of k-th of reference base station, εiFor the residual error of i-th kind of bit combination, MkFor k-th of reference base station
Participate in the combined quantity of positioning;
The base station of weight larger (weight > 0) is selected as secondary classification results, that is, there is nlos environment, obtain
Reference base station with nlos environment.
(4) NLOS error concealment;Include the following steps:
(41) it is carried out using the reference base station (assuming that having k) with NLOS environment that step (3) obtains secondary
TDOA positioning, it is assumed that bit combination (selecting 3,4,5 etc. to be positioned from k) has m kind.TDOA positioning step can join
Examine the Primary Location module of TDOA algorithm;
(42) residual error of this m kind bit combination then is calculated, and residual error is normalized, residual error normalizes formula are as follows:
Wherein,The normalization residual values combined for i-th kind, εiThe residual values combined for i-th kind.
(43) positioning result is weighted using the normalization residual values that step (42) are calculated, the big positioning of residual error
As a result weight small, the small positioning result weighting of residual error is big, and concrete methods of realizing is first to normalization residual error sequence, after sequence
Normalize one score of residual error.For example, it is assumed that residual error 10 in total, the score for setting residual error be from small to large (1,2,3,4,5,
6,7,8,9,10) it, is normalized toFinally using normalized score as
Weight is assigned to positioning result, obtains the positioning result under NLOS environment.Weighted formula are as follows:
Wherein,The normalization residual values combined for i-th kind, (xe,ye) be NLOS environment under positioning result, (xi,yi)
It is the result of i-th kind of integrated positioning.
(44) positioning result under NLOS environment is averaged with the positioning result there is no NLOS environment, is obtained final
Positioning result.
(5) it calculates the positioning result before and after eliminating error to compare and analyze, the correctness of verification algorithm.Calculate TDOA
The average value of algorithm first time positioning result is as the positioning result before error concealment, the non line of sight ring obtained using step (3)
The positioning result of error is eliminated under border and the positioning result under view distance environment takes the average positioning result as after error concealment, is counted
The ratio of the residual error before residual error and error concealment after calculating error concealment verifies the correctness of algorithm, and ratio gets over novel
Bright positioning accuracy is higher.
With reference to Fig. 2, first selection reference base station number, then the physical size of indoor environment, including length and width parameter are set,
The position coordinates of reference base station and target BS are finally generated at random, and the room-sized in figure is 10m × 10m, target BS number
Mesh is 7;
UWB channel model parameters are set, and for the present invention using the third scheme in IEEE UWB channel model, channel is related
Parameter value is as shown in table 1;
The setting of 1 IEEE UWB channel model parameters of table
With reference to Fig. 3, TDOA algoritic module is broadly divided into two kinds of situations, the first situation, when the reference base station positioned
When number is 3, equation group is listed by hyp definition, positioning result is obtained to solving equations;Second situation, when into
When the reference base station number of row positioning is greater than 3, hyp equation group is become the form of matrix, then utilizes least square method
Solution obtains positioning result.With reference to Fig. 4, the reference base station number of positioning is that 3, UWB channel model is first side in table 1
Case, i.e. view distance environment, as can be seen from the figure positioning result and target position coincide substantially, without error;With reference to Fig. 5, positioning
Reference base station number be 4, UWB channel model be third scheme in table 1, i.e. nlos environment, as can be seen from the figure
There is certain errors between positioning result and target position.
With reference to Fig. 6, NLOS error identification module is broadly divided into two steps, and calculating TDOA algorithm first obtains the residual error of result,
Residual error is ranked up, biggish 3 residual errors of lesser 3 residual sums are selected, point of the first step is carried out using support vector machines
Class, is divided into two classes, i.e., residual error is larger with smaller two class of residual error, and residual error biggish one is then taken out from the classification results of the first step
Class carries out the classification of second step using the method for residual analysis judgement, is assigned to using residual values as weight every in corresponding combination
A reference base station calculates the total weight value of each reference base station, total weight value is sorted from large to small, and selects wherein maximum or compares
There are NLOS environment for big reference base station.
With reference to Fig. 7, NLOS error compensation algorithm handles the result that NLOS error identifies, that is, has NLOS ring
The reference base station in border carries out the positioning of TDOA algorithm again, then calculate positioning result residual error, using residual error to positioning result into
It goes and weights, the big positioning result weighting of residual error is small, and the small positioning result weighting of residual error is big, finally by the result after weighting and before
There is no the positioning results of NLOS environment to be averaged, and obtains final positioning result.With reference to Fig. 8, locating base station number is 3, from
It can be seen that the positioning result after NLOS error compensation algorithm is very close with target position in figure, positioning accuracy is obtained
Certain raising.
By the residual error of positioning result after error concealment compared with the residual error before error concealment, the ratio of positioning accuracy raising is obtained
Rate, ratio is smaller, and precision is higher.Listed in table 2 reference base station number be 7 when, participate in locating base station number be respectively 3,4,5
When elimination error after the ratio between positioning result, the result before error concealment and residual error, it can be seen from the table the ratio between residual error is general
0.14 or so, numerical value illustrates that precision is improved less than 1, specific value reference table 2.
2 error concealment result of table
The preferred embodiment of the present invention has been described above in detail, but during present invention is not limited to the embodiments described above
Detail can carry out a variety of equivalents to technical solution of the present invention (in full within the scope of the technical concept of the present invention
Amount, shape, position etc.), these equivalents belong to protection of the invention.