The wireless sensor node range finding of a kind of tunnel and localization methodTechnical field
The present invention relates to wireless sensor network technology field, particularly relate to a kind of range finding and localization method of the wireless sensor network tunnel based on the radio frequency transmission time.
Background technology
Tunnel refers to railway or the vcehicular tunnel in Construction State, or coal mining tunnel.Its common feature is that structure is long and narrow space, and among continuous variation; Electric power and the communications infrastructure are incomplete, there is no reliable wired or wireless communication link; Ventilation and pumping equipment are not studied carefully standby, and air humidity is large; Workmen and preparation of construction comparatively dense, construction environment is more severe.China is coal mining big country, and in the high-speed development period of capital construction, construction safety accident in above-mentioned tunnel happens occasionally, cause great personnel and property loss, therefore in the urgent need to adapting to the monitoring means of this type of environment, can carry out Real-Time Monitoring to construction environment, workmen is positioned, set up advanced disaster early warning system, ensure the safety of workmen and equipment.
Wireless sensor network has following characteristics, makes it be particularly suitable for the monitoring to tunnel environment:
(1) most node low-power consumption in network, can adopt powered battery, require very low to electric power facility;
(2) network uses and exempts from license wireless channel communication (Industrial Scientific Medical, ISM), without wiring;
(3) network using network, message can multi-hop transmission, node flexible arrangement, network topology capable of dynamic changes;
(4) network size is large, and redundance is high, and part of nodes damages the normal operation that does not affect whole system;
(5) adopt direct-sequence spread-spectrum modulation (Direct Sequence Spread Spectrum, DSSS) technology, antijamming capability is strong.
Location is one of most important application of wireless sensor network with following the tracks of.In a lot of application cases, only have its data that gather of location aware of sensor just meaningful; Positional information is for geographical routing algorithm also particular importance; Sometimes position itself is exactly to need the data that gather, as the tracking of the location of goods, target etc.Traditional localization method often can not meet the requirement of wireless sensor network, and reason is as follows:
(1) traditional wireless location technology is as ultra broadband (Ultra Wide Band, UWB), GPS (Global Position System, etc. GPS) power consumption is higher, is difficult in battery powered situation continuous firing some months even several years;
(2) traditional position location techniques need to be used distinctive signal to find range, and equipment cost is high, and data processing complex is difficult to realize on the serious limited wireless sensor node of resource;
(3) traditional position location techniques is often higher to environmental requirement, as GPS can only be in outdoor application, and can not in indoor or tunnel, use.
(4) traditional location algorithm time complexity is high, and computational accuracy is low, is not suitable on radio node, moving in electric weight and computing power is limited and requirement of real-time is high tunnel.
Wireless sensor network (Wireless Sensor Network, WSN) node positioning method can be divided into based on measurement and the two large classes based on non-measurement.It is large that method based on non-measurement is applicable to WSN node density, orientation range circlet border.Its principle is the location of realizing mobile node according to the efficient communication scope of mobile node and graphic method.The method does not have extra hardware requirement to node, but communication overhead is large, and location algorithm complexity adopts centralized location algorithm more, and positioning precision is not high.Localization method based on measuring in two-dimensional space mainly contains three kinds:
(1) according to distance and the direction of destination node and a known location node;
(2) according to the direction of destination node and two known location nodes;
(3) according to the distance of destination node and three known location nodes.
First two method needs user to type antenna, and this is to be difficult to realize for wireless sensor node, and therefore the third method is widely used in WSN location.Hence one can see that, and the distance between Obtaining Accurate destination node and reference mode is the key of location.But the localization method based on range finding at present, precision is low, is not suitable for the location of wireless sensor node in tunnel.
Summary of the invention
The object of the invention is to propose a kind of tunnel wireless sensor node distance-finding method, the method is the relative distance between the transmission time computing node between two nodes by measured message, improves the distance accuracy in tunnel environment.
A kind of tunnel wireless sensor node distance-finding method, comprises the following steps:
Mobile node broadcast Location Request;
Receive the beaconing nodes feedback acknowledgment signal of Location Request;
Mobile node from the beaconing nodes of feedback acknowledgment signal selected part as with reference to node;
Mobile node and reference mode are carried out to forward direction range finding and oppositely range finding, and the mean value that calculates forward direction range finding result and the result of oppositely finding range is the measuring distance between mobile node and reference mode;
The implementation of described forward direction range finding is: mobile node sends inquiry frame to reference mode, calculates the flight time of inquiry frame from mobile node to reference mode, is multiplied by the light velocity obtains forward direction range finding result by the flight time;
The implementation of described reverse range finding is: reference mode sends inquiry frame to mobile node, calculates the inquiry flight time of frame from reference mode to mobile node, is multiplied by the light velocity result of oppositely being found range by the flight time.
Further, if negative value appears in forward direction range finding result or the result of oppositely finding range, this negative value is replaced with to the measuring distance adopting between mobile node and the reference mode calculating based on radio transmission signal intensity (RSSI) decay distance-finding method.
Further, the range finding of described forward direction and oppositely range finding number of times for once or once.
Further, before the mean value that calculates forward direction range finding result and reverse range finding result, also comprise measuring distance screening step:
For each forward direction range finding result, calculate respectively the absolute difference of the each forward direction range finding result beyond itself and its, if certain absolute difference is greater than predetermined failure threshold value, remember that this absolute difference is fault difference, if the fault difference number of certain forward direction range finding result is greater than the half of forward direction range finding overall measurement number of times, screen out this forward direction range finding result;
For each reverse range finding result, calculate respectively the absolute difference of the each reverse range finding result beyond itself and its, if certain absolute difference is greater than predetermined failure threshold value, remember that this absolute difference is fault difference, if certain is oppositely found range, the fault difference number of result is greater than the half of reverse range finding overall measurement number of times, screens out this oppositely range finding result.
Further, the reference mode of choosing described in is not entirely in the same side in tunnel.
Further, described in the half of the reference mode chosen derive from the beaconing nodes signal intensity that is arranged in tunnel one side compared with powerhouse, second half derives from the beaconing nodes signal intensity that is arranged in tunnel opposite side compared with powerhouse.
The localization method of the tunnel wireless sensor node distance-finding method described in application, first obtains the measuring distance between mobile node and each reference mode, then calculates in the following manner mobile node coordinate:
Estimate the initial position of mobile node;
The middle estimated position of iterative computation mobile node; Wherein
Iterative formula is
(x(0), y(0)) be the initial estimated location of mobile node;
(x(k), y(k)) be the k time iteration result, wherein k=0,1,2,3,
(xi, yi) be the coordinate of i reference mode;
Difor mobile node is to the measuring distance of i reference mode;
N is the number of reference mode;
When
or iterations exceedes in limited time, stops iteration, the middle estimated position (x of mobile node
m, y
m) be the iteration result of last iteration, EPS is computational accuracy;
By mobile node initial position (x(0), y(0)) and middle estimated position (xm, ym) difference substitution evaluation function
If S is (x(0), y(0))) < S (xm, ym), choose (x(0), y(0)) as the optimal estimation position of mobile node, otherwise choose (xm, ym) as the optimal estimation position of mobile node.
Further, adopt Maximum Likelihood Estimation Method to estimate the initial position (x of mobile node(0), y(0)).
The present invention, according to the feature of tunnel environment, proposes the above-mentioned WSN tunnel localization method based on the range finding of radio frequency transmission time.Compared with more existing sensor localization technology, the present invention has following several advantage:
(1) distance-finding method based on the radio frequency transmission time (Radio Frequency Time Of Flight, RF TOF) is suitable for this special applied environment in tunnel.Signal intensity instruction (the Received Signal Strength Indication receiving, RSSI) affected by environment very large, particularly in narrow and small tunnel environment, the multipath effect of radiofrequency signal is serious, ponding in tunnel and wall also make radiowave decay speed serious, and these factors make the hurried increase of error of finding range with RSSI in tunnel.And the RF TOF range finding time is short, can adopt the mode of frequency hopping, reduce and produce the probability that multipath disturbs and is detected, in tunnel, signal attenuation is very little on the velocity of propagation impact of radio frequency signal, therefore in long distance (the more than 3 meters) range finding of RF TOF in tunnel, shown good adaptability.
(2) based on RF TOF range finding aspect by rational fault threshold is set, ranging data is repeatedly carried out to difference calculating, and by difference and fault threshold comparison, rejects the abnormal data that difference exceedes fault threshold.The method has effectively solved range finding failure and positioning system locate failure that transient fault causes, make distance accuracy and wireless system be positioned with efficiency and obtain raising by a relatively large margin, the locator data missing rate that effectively reduces range finding mortality and system, has promoted positioning system performance.
(3) on the basis of traditional maximum likelihood estimation algorithm, added the repeatedly process of iteration Stepwise Refinement, this location algorithm has the features such as time complexity is low, precision is high, good stability, is adapted at long-time running on radio node in electric weight and computing power are limited and requirement of real-time is high tunnel.
(4) location algorithm that the present invention proposes has good economic benefit.Location and the tracking of traditional wireless sensor network to mobile node is very difficult, and cost is high.The present invention utilizes the localization method that the transmission time of wireless signal is realized WSN node both can reduce costs, and can in this rugged environment in tunnel, realize easily again the location of workmen and equipment is followed the tracks of, and can extensively promote, and economic and social profit is good.
Brief description of the drawings
Fig. 1 is position system device overall construction drawing;
Fig. 2 is mobile node positioning flow figure;
Fig. 3 comes and goes range measurement principle figure based on RF TOF.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in detail, be to be noted that described embodiment is only intended to be convenient to the understanding of the present invention, and it is not played to any restriction effect.
In the present invention, main controlled node (as in accompanying drawing 1 1.) receive the self-position information that mobile node calculates and report host computer by cable network by wireless sensor network; Beaconing nodes (as in accompanying drawing 1 2.) refer to known position information and there is the wireless sensor node of radio frequency transmission function; Reference mode refers to the beaconing nodes that participates in location Calculation; Mobile node (as in accompanying drawing 1 3.) refer to the node that need to position it that has mobile behavior in wireless sensor network.
The above-mentioned wireless sensor network tunnel localization method based on the radio frequency transmission time, beaconing nodes along tunnel wall with homonymy uniformly-spaced, bilateral alternative arrangement, to ensure that in tunnel, chain-shaped network structure has certain communication redundancy degree, and at least three beaconing nodes can be found in mobile node arbitrary position in tunnel within the scope of its efficient communication.Beaconing nodes carries out network numbering according to the following rules: the beaconing nodes that is set in phase the same side, tunnel is odd-numbered, opposite side be even-numbered.
As shown in Figure 2, concrete steps are as follows for wireless sensor network tunnel localization method flow process based on the radio frequency transmission time:
Step (1) mobile node broadcast Location Request;
Step (2) is received the beaconing nodes feedback acknowledgment signal of Location Request;
Step (3) mobile node from the beaconing nodes of feedback acknowledgment signal selected part as with reference to node:
This example is evenly distributed on both sides, tunnel as reference mode selection criterion taking signal energy height and reference mode as far as possible.Be specially:
Mobile node is monitored the beacon that sends of beaconing nodes, and by the individual beaconing nodes of following rules selection n (n >=3) as the needed reference mode in location: the beaconing nodes that (1) is close to position according to the received signal strength indicator (RSSI) that receives beacon sorts; (2) choose each [n/2] the individual conduct of the beaconing nodes of odd number that received signal strength indicator value is the highest and the beaconing nodes of even number with reference to node, if 2 × [n/2] < n, then choose point that in all the other beaconing nodes, received signal strength indicator value is the highest as with reference to node ([n/2] represents to be no more than the maximum integer of n/2).
Step (4) is calculated the measuring distance of mobile node and each reference mode and result is carried out to fault-tolerant processing:
(4.1) measuring distance of calculating mobile node and each reference mode:
RF TOF refers to that message node from WSN is sent to the needed time of another node by less radio-frequency.Because the aerial velocity of propagation of radiofrequency signal is constant, be c=3 × 108(m/s) distance that, therefore can calculate between two nodes is Distance=c × TtOF, wherein TtOFrepresent the transmission time of radiofrequency signal between two nodes.Range measurement system based on RF TOF is utilized the radio-frequency (RF) transceiver for data communication in WSN, carries out simple signal processing, without add extra hardware on node, can in complex environment, obtain the distance accuracy of meter level; Short based on the RF TOF range finding time, can adopt the mode of frequency hopping, reduce and produced the probability that disturbs and be detected.
Based on RF TOF, range finding has two schemes.The first is unidirectional measurement, require two nodes that participate in measuring to have high precision, synchronous clock, the node of known location sends message to another one node, the positional information that message comprises node and transmission time information, another one node deducts the transmitting time that message comprises by message after receiving message time of arrival, gets final product to obtain the flight time.This scheme is very high to node hardware requirement, will greatly increase cost and the power consumption of WSN network.First scheme is called to come and go to be measured, and as shown in Figure 3, A node sends a query message POLL to B node, and B node automatically replies a response message ACK.A node can be measured from query message and be sent to and receive response message T.T. used, is denoted as TtOT; B node measurement is replied required time of query message, i.e. response time TtAT.From T.T., deduct response time, get final product to obtain message fl transmission and reverse transfer time sum, be denoted as TrTT.Suppose the transmission time T of both direction messagetOFequate TtOFbe half of the round-trip transmission time,
TTOF=TRTT/2=(TTOT-TTAT)/2 (1)
The present invention adopts two-way round measuring method, reduces due to the caused measuring error of clock jitter that participates in two nodes measuring.Sent and inquire about frame to reference mode by mobile node, the scheme of calculating the flight time (Time of Flight, TOF) according to message time of return is called forward direction measurement, and is referred to as reverse measurement by the scheme of reference mode transmission inquiry frame calculating TOF.When the present invention measures TOF, carry out m forward direction and measure, oppositely measure for m time, then calculate the mean value of 2m TOF measurement result as the actual value of message transfer time between two nodes, improve measuring accuracy.M generally gets 5~10.
The message transfer time unit measuring based on RF TOF distance-finding method is psec, 10-12second, the transmission speed that is multiplied by radiowave with it, can obtain the distance between two nodes,
Distance=TToF×3×10-4(m) (2)
In addition, the clock frequency of considering reference mode and mobile node has error and other factors to cause TtOT≤ TtATtime, adopting based on RSSI decay range finding and replace the range finding based on RF TOF, the logarithm normal distribution model tormulation formula based on RSSI decay range finding is
Wherein:
Difor mobile node and i, (i=1,2 ... n) distance between individual reference mode (rice);
D0for reference distance (rice), generally get 1 meter;
RSSI (di) be that distance is ditime receiving end received signal power (dBm);
RSSI (d0) be reference distance d0the received signal power (dBm) that point is corresponding;
ζσbe the Gaussian random variable (dBm) that a mean value is 0, reflected when distance one timing, the variation of received signal power;
λ is path loss index, be one with the value of environmental correclation.
Make P=RSSI (d0)+10 λ lg (d0)+ζσ, Q=10 λ, is organized into expression formula (3)
RSSI(di)=P-Qlg(di) (4)
Therefore in definite localizing environment, the value of P and Q can be according to many groups RSSI (d of testi) and divalue utilize logarithm matching (with reference to " computing method " Shen Yuantong, sealwort China, publishing house of Li Shaohua volume-China University of Geosciences, 2004.2:53~57) to obtain.
(42) range finding result fault-tolerant processing:
In 2m the measured value for each reference mode in (4.1) and mobile node relative distance, calculate the wherein absolute difference of each measured value and other 2m-1 measured value, if certain absolute difference is greater than predetermined failure threshold value (predetermined failure threshold value is generally got 5~10 times of expectation measuring accuracy), remember that this absolute difference is fault difference, if the fault difference number of this measured value is greater than m, screen out this measured value;
Step (5) is estimated mobile node initial position:
The method of estimating mobile node initial position is a lot, and synthesis precision height, programming difficulty or ease, complexity height many factors, preferentially adopt Maximum Likelihood Estimation Method.
If
Wherein
(xi, yi) be the coordinate of i reference mode;
Difor mobile node is to the measuring distance of i reference mode;
(x(0), y(0)) be the mobile node initial position of estimating.
By formula
X=(ATA)-1ATb (6)
Can obtain initial position (x(0), y(0)).
The middle estimated position of step (6) iterative computation mobile node:
By the initial estimated location (x obtaining in step (5)(0), y(0)) being updated to iterative formula, iteration expression formula is as follows
Wherein
(x(0), y(0)) be the mobile node initial estimated location of utilizing Maximum Likelihood Estimation Method to obtain;
(x(k), y(k)) be the k time iteration result, wherein k=1,2,3,
N is the number of reference mode.
When
or iterations exceedes in limited time, stops iteration, the middle estimated position (x of mobile node
m, y
m) be the iteration result of last iteration.Wherein EPS is computational accuracy, if iteration precision will reach one decimal place, EPS=0.1; If reach after radix point 4, and EPS=0.0001, the rest may be inferred.The iterations upper limit is generally got 5~10 times.
Step (7.0) is by mobile node initial position (x(0), y(0)) and middle estimated position (xm, ym) distinguish in substitution evaluation function, the expression formula of evaluation function is
If S is (x(0), y(0)) < S (xm, ym), choose (x(0), y(0)) as the optimal estimation position of mobile node, otherwise choose (xm, ym) as the optimal estimation position of mobile node.Mobile node reports main controlled node by wireless sensor network by the elements of a fix.
The present invention is not only confined to above-mentioned embodiment; persons skilled in the art are according to content disclosed by the invention; can adopt other multiple embodiment to implement the present invention; therefore; every employing project organization of the present invention and thinking; do some simple designs that change or change, all fall into the scope of protection of the invention.