Background technology
In recent years, along with the development of sensor technology, wireless communication technology and integrated circuit technique, wireless sensor network becomes one of current study hotspot, and is widely used in the numerous areas such as military security, environmental monitoring, geologic prospecting and Industry Control.
In wireless sensor network, the positional information of sensor node is very crucial, and it is the important component part of the data that collect.Only have the position of having determined node, its data that collect just have using value.In addition, the important foundation of other application of wireless sensor network such as the positional information of node or object real-time tracking, auxiliary route, target of prediction track.Generally, wireless sensor network has a large amount of sensor nodes, each sensor node is positioned very difficult by the mode that installs GPS receiver or artificial deployment additional.Therefore, be necessary very much to study the self-locating method of sensor node.
For various application demands, the researchist has proposed the node positioning method of multiple wireless sensor network.Mainly comprise avoid the range finding (range-free) localization method and based on the range finding (range-based) localization method.
The localization method that avoids finding range is to utilize connectivity between the node to estimate the coordinate of unknown node.These class methods do not need the distance between the measured node, and hardware is not had special requirement, are once becoming the focus of people's research.But its bearing accuracy is not high, and rough positional information can only be provided.And higher to density and the structural requirement of network, inter-node traffic is also larger.Therefore, application is limited by very large.
Localization method based on range finding can obtain higher bearing accuracy, but its development is subject to the problems such as node hardware and time synchronized.Now, along with the progress of science and technology, especially the widespread use of micro-electromechanical technology and super-broadband tech (Ultra Wide Band, UWB) makes this class localization method regain people's attention.These class methods mainly are divided into two steps: the first step is range finding, node is by (Time Of Arrival time of arrival of signal, TOA), time of arrival poor (Time Difference Of Arrival, TDOA), arrive angle (Angle Of Arrival, AOA) or the intensity indication information such as (Received Signal Strength Indicator, RSSI) that receives signal measure the distance of unknown node and beaconing nodes; Second step is location estimation, according to the range information that obtains, utilizes polygon measurement and positioning method direct solution, perhaps orientation problem is converted into optimization problem, utilizes various optimization methods to find the solution, to improve bearing accuracy.
Optimization method commonly used is applied to the wireless sensor network location and mainly contains: least square localization method, the method are comparatively simple, but need inverse matrix to calculate, and not only operand is larger, and bearing accuracy also has very limit; The least residual technology is got the excellent estimation that positions by circulation, although improved bearing accuracy, has increased simultaneously calculated amount; Protruding optimization method based on positive semidefinite planning is estimated node location, but computation complexity is higher.
For different problems and application, the researchist has proposed multiple wireless sensor network locating method.But these localization method great majority design for two-dimensional environment, and in actual applications, sensor node often is distributed in the three dimensions, and such as ocean, mountain region, forest etc., this just need to come node is carried out three-dimensional localization with the wireless sensor network 3-D positioning method.In three-dimensional environment, because the factors such as unknown positional information increases, range error increase, so if directly two-dimensional location method is promoted to 3-D positioning method, cause easily the problems such as cumulative errors increase, bearing accuracy reduction.Up to now, for the problem of wireless sensor network node three-dimensional localization, also there is not in the world a kind of generally acknowledged good solution.
Summary of the invention
Defective for existing wireless sensor network three-dimensional localization techniques, the invention provides a kind of three-dimensional locator of valid wireless sensor device network node, it is optimized based on BFGS, the BFGS optimization method is applied to the wireless sensor network three-dimensional localization, improve bearing accuracy, and avoided matrix operation complicated in the classical least square method.
The present invention is achieved by the following technical solutions:
According to the range finding equation that obtains, the orientation problem of wireless sensor network node is converted into Unconstrained Optimization Problems, utilize the classical way BFGS optimization method of finding the solution Unconstrained Optimization Problems to seek to make the unknown node of range error minimum.
Because the impact that is subject to easily environment based on the unknown node that records of localization method and the distance measure between the beaconing nodes of range finding, such as non line of sight, multipath etc., so distance measure is usually bigger than normal than actual value, namely when distance measure more hour, its probability that is interfered is less.Therefore, the inverse of considering to adopt distance measure embodies the confidence level of the beaconing nodes of its representative as weights by weights.When distance measure is less, its inverse is larger, and the confidence level of the beaconing nodes of its representative is larger, and this beaconing nodes is larger to the power to make decision of unknown node.
Principle accordingly as weights, has defined the objective function of a new wireless sensor network three-dimensional localization with the inverse of the distance measure between unknown node and the beaconing nodes.
The classical way BFGS optimization method that the wireless sensor network three-dimensional locator of optimizing based on BFGS is found the solution Unconstrained Optimization Problems by introducing is estimated the position of unknown node, under the prerequisite that guarantees bearing accuracy, avoided the matrix operation of complexity in the least square method.
The specific implementation process is as follows:
1, location model
Usually hypothesis is in three dimensions, and the coordinate of unknown node is (x, y, z), and the coordinate of beaconing nodes is respectively (x
1, y
1, z
1), (x
2, y
2, z
2),
(x
n, y
n, z
n), unknown node is respectively d to the distance of beaconing nodes
1, d
2, Λ, d
nAccording to the relation of two-dimensional space middle distance and coordinate, can derive the expression formula of three-dimensional environment middle distance and coordinate relation, the equation of namely finding range:
With the both sides of each equation in the system of equations simultaneously square, and with last equation as the common equation of n th order n that falls, other equations in the system of equations deduct respectively this public equation of n th order n that falls, and following formula is fallen time process, the form that is organized into matrix is:
AX=B (2)
Wherein,
X=[x y z]
T,
Because there is measuring error in internodal distance measure, therefore, than the more rational model of formula (2) is:
AX+N=B (3)
Wherein, N is n-1 dimension stochastic error vector.
Because being converted in the hope of the N minimum, N=B-AX, institute ask following formula minimum,
minQ(X)=|N|=|B-AX| (4)
According to following formula, orientation problem can be converted into optimization problem, can utilize optimization method to find the solution.
2, BFGS optimization method ultimate principle
If Positive Definite Quadratic Function
X ∈ P wherein,
Be convex set, because its second-order partial differential coefficient ▽
2F (X)=a positive definite, then f (X) is convex function, f (X) is at R so
nOn have global minimum point.Find the solution the minimal value of f (X), can be summarized as Unconstrained Optimization Problems, namely
minf(X),X∈R
n (6)
The method of finding the solution this problem has a lot, and wherein the BFGS optimization method is one of effective method of generally acknowledging.
The BFGS optimization method is the improvement to Newton method, and the Newton iterative method formula is as follows:
Wherein, S
kBe the direction of search, ▽ f (X) is the single order partial derivative, ▽
2F (X) is second-order partial differential coefficient, and k is iterations.
Can find out that from formula (7) Newton method needs the inverse matrix of the second-order partial differential coefficient of calculating target function, often infeasible in practice.
The BFGS optimization method has been avoided complex calculations in the Newton method, and its basic thought is Hessian estimated matrix H of structure, is used for approaching the second-order partial differential coefficient inverse matrix in the direction of search of Newton method, i.e. (▽ in the formula (7)
2F (X
k))
-1, then find the solution iteration step length according to the direction of Gradient Descent, revise estimated matrix, carry out iteration.The key of the method is the selection of initial position and finding the solution of estimated matrix.Iterative formula is:
Wherein, S
kBe the direction of search, ▽ f (X) is the single order partial derivative of objective function, λ
kBe step-length, k is iterations, H
kBe the estimated matrix of second-order partial differential coefficient inverse matrix, Δ H
kBe estimated matrix H
kCorrection term.In the BFGS method, correction term Δ H
kThe standard mathematic(al) representation be:
Wherein, Δ g
k=▽ f (X
K+1)-▽ f (X
k),
If initial estimation matrix H
0=I is according to H
kHas hereditary H
0The character of symmetry, positive definite can guarantee arbitrarily H
kAll be symmetric positive definite matrix, and then guarantee that objective function f (X) is at R
nOn have global minimum.
The step of the three-dimensional locator of the wireless sensor network node of 3, optimizing based on BFGS
According to mentioned above, utilize the inverse of distance measure as weights, embody the confidence level of far and near different beaconing nodes by weights, the objective function that has defined the wireless sensor network 3-D positioning method of optimizing based on BFGS is:
Wherein,
A (i)=-2[(x
i-x
n) (y
i-y
n) (z
i-z
n)],
X=[x y z]
T, n is the number of the neighbours' beaconing nodes in the unknown node one jumping scope, d
iIt is the distance measure between i beaconing nodes and the unknown node.
Step 1: the foundation of network
Network is initial, distributes an ID for each sensor node, and beaconing nodes (Beacon Node) and unknown node (Unknown Node) are carried out mark.Then, beaconing nodes sends message to the unknown node in oneself jumping scope, and message content comprises ID and the D coordinates value of oneself.Unknown node is got off the message accounting of receiving.
Step 2: the choosing of the unknown node that can locate
According to the message that receives, choose those unknown node that can locate that the number of beaconing nodes in the jumping scope is at least 4 and find range.In addition, the unknown node that has obtained location estimation namely can be used as beaconing nodes, and other unknown node are positioned.
Step 3: the measurement of the distance between unknown node and the beaconing nodes
The unknown node that can locate is measured the distance between itself and neighbours (in the jumping scope) beaconing nodes, is designated as distance measure.
Step 4: the setting of initial value
The selection of the initial position of the unknown node that can locate is extremely important, and suitable initial position is the iterations of methods to reduce noises effectively, and improves bearing accuracy.This method is in conjunction with centroid method, and the center of all beaconing nodes in the unknown node one jumping scope that can locate is as initial position.
Suppose that the initial position of finding the solution the unknown node that can locate is X
0, computational accuracy ε>0 and initial estimation matrix H
0=I, wherein I is unit matrix, initialization iterations k=0.
Step 5: the determining of the direction of search
The location estimation X that obtains according to step 4 or step 8
kWith estimated matrix H
k, obtain direction of search S
k
S
k=-H
k▽f(X
k) (11)
Step 6: approach renewal a little
Here ▽ f (X) is the single order partial derivative of the objective function (formula (10)) that defines in the literary composition, then, and along S
kDirection is carried out precise search, utilizes
Obtain step-length λ
k, obtain the next one and approach a little,
X
k+1=X
k+λ
kS
k (13)
Step 7: the judgement of exit criteria
Judge according to computational accuracy and the iterations set, if satisfy
‖▽f(X
k+1)‖<ε (14)
Or reach maximum iteration time, then iteration finishes, X
K+1It is exactly required optimum estimate.Otherwise, change step 8 over to.
Step 8: estimate the Hessian matrix
According to formula (8) and formula (9), obtain
H
k+1=H
k+ΔH
k (15)
Make k=k+1, and return step 5.
Beneficial effect of the present invention is:
(1) bearing accuracy
Bearing accuracy is the most important performance evaluating of localization method, usually represents with the average positioning error of node, i.e. the ratio of the difference of the estimated coordinates of node and true coordinate and communication radius:
Wherein, R
AccuracyThe expression bearing accuracy, the beaconing nodes number that n and m are respectively the node sum and can locate, R is the node communication radius.Fig. 2 is the comparison diagram of the bearing accuracy of the wireless sensor network three-dimensional locator of optimizing based on BFGS that proposes of the present invention and least square steady arm.As shown in Figure 2, the steady arm that the present invention proposes is compared with the least square steady arm, and bearing accuracy is higher.As can be seen from Figure 2, the bearing accuracy of the steady arm of the present invention's proposition is apparently higher than the bearing accuracy of least square steady arm.
(2) distribution of beaconing nodes
In node locating, the position of beaconing nodes is extremely important, and the position of choose reasonable beaconing nodes can reduce node density, and can effectively improve precision and the speed of location.Adopt respectively beaconing nodes stochastic distribution and beaconing nodes marginal distribution dual mode, compare the steady arm of the present invention's proposition and the performance of least square steady arm, as shown in Figure 3.As can be seen from Figure 3, compare with the least square steady arm, the steady arm that the present invention proposes divides the bearing accuracy that plants all better two kinds of beaconing nodes.
(3) range error
Internodal distance measure is inaccurate, has error, is called range error.Range error directly affects positioning result, and range error is larger, and positioning result is more inaccurate, and bearing accuracy is poorer.
Range error mainly comprises two classes: sighting distance (Line Of Sight) error and non line of sight (Non Line Of Sight) error.Wherein, the sighting distance error mainly refers to measure noise, is that the hardware and software of sensor node itself causes; The non line of sight error is the main source of range error, and is relevant with the environment in radio sensor network monitoring zone, and barrier, multipath are weak etc. all can exert an influence to range channel, thereby has produced the non line of sight error.What affect bearing accuracy mainly is the non line of sight error.Fig. 4 is the steady arm that proposes of the present invention and the comparison diagram of the bearing accuracy of least square steady arm under different non line of sight errors.As can be seen from Figure 4, along with the increase that the non line of sight error accounts for the ratio of total error, the bearing accuracy of steady arm reduces gradually.But the steady arm that the present invention proposes is in the situation of beaconing nodes marginal distribution and stochastic distribution, and bearing accuracy all is higher than the least square steady arm, illustrates with the least square steady arm to compare, and the steady arm that the present invention proposes has better fault-tolerance.
In sum, the present invention proposes a kind of three-dimensional locator of valid wireless sensor device network node, orientation problem is converted into Unconstrained Optimization Problems, and introduce the classical way BFGS optimization method find the solution unconstrained extrema, obtain the three-dimensional coordinate of unknown node to realize three-dimensional localization, the self poisoning that adapts to wireless sensor network node in the reality under the prerequisite that guarantees higher positioning accuracy, has been avoided matrix operation complicated in the least square steady arm.
Embodiment
The present invention is further detailed explanation below in conjunction with drawings and the specific embodiments.
Steady arm of the present invention is optimized based on BFGS, according to the range finding equation that obtains, the orientation problem of wireless sensor network node is converted into Unconstrained Optimization Problems, utilizes the classical way BFGS optimization method of finding the solution Unconstrained Optimization Problems to seek to make the unknown node of range error minimum.
In conjunction with Fig. 1, three-dimensional locator of the present invention passes through following steps successively:
Step 1: the foundation of network
Network is initial, distributes an ID for each sensor node, and beaconing nodes (Beacon Node) and unknown node (Unknown Node) are carried out mark.Then, beaconing nodes sends message to the unknown node in oneself jumping scope, and message content comprises ID and the D coordinates value of oneself.Unknown node is got off the message accounting of receiving.
Step 2: the choosing of the unknown node that can locate
According to the message that receives, choose those unknown node that can locate that the number of beaconing nodes in the jumping scope is at least 4 and find range.In addition, the unknown node that has obtained location estimation namely can be used as beaconing nodes, and other unknown node are positioned.
Step 3: the measurement of the distance between unknown node and the beaconing nodes
The unknown node that can locate is measured the distance between itself and neighbours (in the jumping scope) beaconing nodes, is designated as distance measure.
Step 4: the setting of initial value
The selection of the initial position of the unknown node that can locate is extremely important, and suitable initial position is the iterations of methods to reduce noises effectively, and improves bearing accuracy.This method is in conjunction with centroid method, and the center of all beaconing nodes in the unknown node one jumping scope that can locate is as initial position.
Suppose that the initial position of finding the solution the unknown node that can locate is X
0, computational accuracy ε>0 and initial estimation matrix H
0=I, wherein I is unit matrix, initialization iterations k=0.
Step 5: the determining of the direction of search
The location estimation X that obtains according to step 4 or step 8
kWith estimated matrix H
k, obtain direction of search S
k
S
k=-H
k▽f(X
k) (11)
Step 6: approach renewal a little
Here ▽ f (X) is objective function
The single order partial derivative,
Wherein,
A (i)=-2[(x
i-x
n) (y
i-y
n) (z
i-z
n)],
X=[x y z]
T, n is the number of the neighbours' beaconing nodes in the unknown node one jumping scope, d
iIt is the distance measure between i beaconing nodes and the unknown node.
Then, along S
kDirection is carried out precise search, utilizes
Obtain step-length λ
k, obtain the next one and approach a little,
X
k+1=X
k+λ
kS
k (13)
Step 7: the judgement of exit criteria
Judge according to computational accuracy and the iterations set, if satisfy
‖▽f(X
k+1)‖<ε (14)
Or reach maximum iteration time, then iteration finishes, X
K+1It is exactly required optimum estimate.Otherwise, change step 8 over to.
Step 8: estimate the Hessian matrix
According to formula (8) and formula (9), obtain
H
k+1=H
k+ΔH
k (15)
Make k=k+1, and return step 5.
It should be noted that at last; above embodiment is only unrestricted in order to technical scheme of the present invention to be described; although with reference to preferred embodiment the present invention is had been described in detail; but protection scope of the present invention is not limited to this; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; the modification that can expect easily or be equal to replacement, and do not break away from the spirit and scope of technical solution of the present invention, all should be encompassed within protection scope of the present invention.