Summary of the invention
Technical problem: in fence covers, when number of sensors not or some sensor experiences failure or when exhausting energy, fence breach may appear in the sensor network of random placement.The present invention proposes a kind of directional sensor network fence restorative procedure based on mobile node in the feature of research wireless sensor network strong fence covering and the basis of strong fence covering algorithm, makes movable sensor minimum number used.
Technical scheme: have a large amount of challenging problems based in the directional sensor network fence breach recovery technique of mobile node.First because the limited viewing angle of oriented transducer, and the perceived direction of fixation of sensor is skimble-scamble, judge that whether the sensing region of two transducers is overlapped, and the distance calculated between two transducers is complicated; The second, because transducer is random placement, after initial covering, calculate the number of the strong ties that formed bunch and identify that the concrete sensor node in each bunch has challenge; 3rd, the cost manufacturing movable sensor is more much higher than the cost of fixation of sensor, and this impels us will use the least possible movable sensor.Therefore, finding the least possible movable sensor and fixation of sensor to be formed, fence covers also is the technical problem underlying of this invention.
First the present invention adopts the sensor part arranging method based on straight line to dispose sensor node, by judging whether the sensing region of two transducers has overlapping method, judge whether the overlay area of any two transducers in protection zone has overlap, strong ties bunch recognizer is used according to result of determination, identify each association bunch by force that the fixation of sensor of random distribution is formed, calculate between any two strong ties bunch again and each strong ties bunch respectively with the beeline of right boundary, by beeline divided by the maximum sensing range of mobile sensor node and the minimum movable sensor quantity obtained for repairing between any two strong ties bunch and needed for breach that each strong ties bunch and right boundary are formed that rounds up, then dijkstra's algorithm is utilized to obtain required total minimum movable sensor quantity and obtain target coverage position, finally movable sensor is moved to target coverage position.
It is as follows that directional sensor network fence restorative procedure based on mobile node of the present invention specifically performs step:
Step one: the overlay area determining transducer, adopts the directional sensor network dispositions method based on straight line, disposes being fixed with to transducer in overlay area;
Step 2: the method adopting determine sensor node perceived region overlapping, judges whether the sensing region of any two movable sensors in overlay area has overlap and judge whether the sensing region of each transducer has overlapping with the right boundary of overlay area respectively;
Step 3: adopt strong ties bunch recognizer, identifies that the oriented transducer in overlay area forms each strong ties bunch;
Step 4: the beeline in calculating coverage area based between any two strong ties bunch sensing regions, and the point that the spacing storing any two strong ties bunch sensing regions is the shortest, calculate the beeline between the sensing region of each strong ties bunch and right boundary, and the point that the spacing storing the sensing region of each transducer and right boundary is the shortest;
Step 5: the beeline between the sensing region of strong ties bunch and between the sensing region of strong ties bunch and right boundary is rounded up obtain for repairing between strong ties bunch sensing region and the minimum movable sensor quantity of strong ties breach bunch between sensing region and right boundary divided by the maximum sensing range of movable sensor;
Step 6: employing Dijakstra algorithm asks the minimum number of sensors needed for from left margin to right margin, using left margin as initial vertex, right margin is as termination summit, and using each strong ties bunch as an intermediate vertex, connect all summits, weight table on every bar limit express strong to connect bunch and between strong ties bunch or right boundary for repairing the minimum number of sensors needed for breach, utilize dijkstra's algorithm to obtain from initial vertex to the minimum value of weights summation stopping summit, be the minimum value of total number of sensors of repairing needed for fence breach;
Step 7: the target location and the start angle α thereof that obtain movable sensor
i, movable sensor is moved to target location, implements to repair.
Wherein, the target location of described movable sensor and the computational methods of start angle as follows:
Suppose strong ties bunch sc
1and sc
2sensing region between nearest point be respectively p
a=(x
a, y
a) and p
b=(x
b, y
b); If line segment p
ap
bwith horizontal square to angle be σ then when movable sensor perception visual angle φ meet 0≤φ < π/3 time, be σ-φ/2 for repairing the initial perception angle [alpha] of movable sensor, if now α < 0, α=α+2 π; If when the perception visual angle φ of movable sensor meets π/3≤φ < 2 π, the initial perception angle [alpha] of movable sensor is σ+pi/2-φ/2, if now α < 0, α=α+2 π;
σ asks method as follows: cross some p
amake the line parallel with x-axis, get p on line
athe point p on right side
cif, y
b>=y
a, then σ=∠ p
bp
ap
c; If y
b< y
a, then σ=2 π-∠ p
bp
ap
c, wherein ∠ p
bp
ap
cscope be [0, π];
When 0≤φ < π/3, the x of movable sensor target location, y coordinate is respectively:
x
j=x
a-cosσ*Δ+(j-1)cosσ*(l-Δ)
y
j=y
a-sinσ*Δ+(j-1)sinσ*(l-Δ)
As π/3≤φ < π, the x of movable sensor target location, y coordinate is respectively
x
j=x
a-cosσ*Δ+(j-1)cosσ*(l-Δ)+R*sin(φ/2)*cosσ+R*cos(φ/2)*cos(σ+3π/2)
y
j=y
a-sinσ*Δ+(j-1)sinσ*(l-Δ)+R*sin(φ/2)*sinσ+R*cos(φ/2)*sin(σ+3π/2)
As π≤φ < 2 π, the x of movable sensor target location, y coordinate is respectively
x
j=x
a-cosσ*Δ+(j-1)cosσ*(l-Δ)+cosσ*R
y
j=y
a-sinσ*Δ+(j-1)sinσ*(l-Δ)+sinσ*R
Wherein, R is the perception radius of movable sensor, and l represents the maximum sensing range of movable sensor, j=1,2...w (sc
1, sc
2), Δ is the overlapping spacing of adjacent movable sensor:
Δ=(w(sc
1,sc
2)*l-d(sc
1,sc
2))/(w(sc
1,sc
2)+1)
W (sc
1, sc
2) represent minimum movable sensor quantity for covering the fence breach between two strong ties bunch:
D (sc
1, sc
2) be p
a, p
bbetween distance, namely
Beneficial effect: the present invention proposes a kind of directional sensor network fence restorative procedure based on mobile node, the feature of research wireless sensor network strong fence covering and the basis of strong fence covering algorithm realize the reparation of fence breach, makes movable sensor minimum number used.
Embodiment
One, architecture
The present invention is primarily of four part compositions, and one is introduce the directional sensor network dispositions method based on straight line; Two is introduce judgement two sensor node S
iand S
jsensing region whether have overlapping method, namely use theorem: direction sensor S
iand S
jsensing region overlapped, and if only if S
ifan-shaped two radiuses of perception and an arc and S
jfan-shaped two radiuses of perception and an arc there is at least one intersection point.When judging whether the overlay area of two transducers has an overlap, consider transducer S
iand S
jthe fan-shaped border expression formula of perception show, whether the Decision boundaries that then establishes an equation has intersection point to judge whether the sensing region of two transducers has overlap; Three is whether have overlapping method according to the sensing region of judgement two transducers, judges whether the sensing region of any two fixation of sensor nodes in protection zone has overlap, and utilizes the strong ties bunch all strong ties bunch of recognizer identification; Four be utilize dijkstra's algorithm calculate needed for minimum number of sensors and the target shift position of movable sensor, and adopt movable sensor to carry out gap repair.
Based on the directional sensor network dispositions method of straight line
The present invention is it is considered that N number of fixation of sensor is deployed in the rectangular region of long L and wide H according to based on line part arranging method.Relative to being uniformly distributed, the deployment based on straight line can reduce sensor density to a great extent.When disposing based on straight line, transducer spreads out along a specific straight uniform, such as this straight line of y=0, and the horizontal target coordinate of i-th sensor node is:
By (x
i, y
i) represent the physical location of i-th transducer.Due to the randomness of disposing, it may be with
there is deviation, S
ilevel and vertical range deviation use respectively
with
represent.Then actual sensor coordinates is
here apart from us, random error supposes that obeying average is 0, variance is σ
2gaussian Profile, namely
and the initial perceived direction of fixation of sensor obeys to be uniformly distributed on 0 to 2 π.Suppose that we can obtain the coordinate position of sensor node, perception radius, the visual angle of perception and the start angle of perception.Fig. 1 adopts to carry out disposing based on the sensor deployment strategy of straight line and the deployment result that obtains, in this deployment, transducer along this lineal layout of y=0 in the protection zone of long 500 wide 80.
Judge two sensor node S
iand S
jthe whether overlapping method in sensing region
What strong fence covering algorithm was studied is the problem can caught by sensor network when invader passes through protection zone along arbitrary trajectory.Deployer's utilize the sensing region of a series of transducer to construct continuous fence that one is passed through border, protection zone, can be detected during to ensure that all invaders pass through protection zone.Make the sensing region of transducer form a continuous print fence line, need there be overlap the overlay area of adjacent sensors.In oriented sensor node two dimension sensor model, if oriented transducer S
iand S
jsensing region overlapped, and if only if S
ithe fan-shaped border of perception and S
jthe fan-shaped border of perception there is at least one intersection point, i.e. S
ifan-shaped two radiuses of perception and an arc and S
jfan-shaped two radiuses of perception and an arc there is at least one intersection point.How to judge two transducer S
iand S
joverlay area whether have overlap be strong fence cover in major issue.Consider S
iand S
jthe fan-shaped border expression formula of perception show, whether the Decision boundaries that then establishes an equation has intersection point to judge S
iand S
jsensing region whether have overlap.
Abstract known by the oriented sensor node perceptual performance to reality, the perception of node has directivity, and perception limited viewing angle system, so that its sensor model is one on two dimensional surface is the center of circle with node, perceived distance is radius is fan-shaped.As shown in Figure 2, on two dimensional surface, node directional sensing model model adopts four-tuple (L
i, R, α
i, φ) represent.Wherein, L
i(x
i, y
i) be the coordinate of oriented sensor node on two dimensional surface, R is the perception radius of node, α
ifor the initial perceived direction of this node, φ is the perception visual angle of sensor node.
As shown in Figure 2, L
i, A
i, B
ifor transducer S
ithree summits on sensor model, two line segment L
ia
i, L
ib
iwith an arc A
ib
iconstitute S
icover fan-shaped border.We use
represent S
ithe fan-shaped border of perception, then A
iand B
ican be denoted respectively as:
(x
i+ Rcos α
i, y
i+ Rsin α
i) and (x
i+ Rcos (α
i+ φ), y
i+ Rsin (α
i+ φ)).
Postulated point P (x, y) is at line segment L
ia
ion, some Q (u, v) is at line segment L
ib
ion, some R (w, z) is at arc A
ib
ion, then P, Q, R should meet equation respectively:
Transducer S
jborderline point also can represent with similar equation.As transducer S
iand S
jsensing region overlapping, S
iand S
jthe fan-shaped border of perception
with
at least there is an intersection point.Therefore, we are by judging
with
whether whether there is intersection point, to come the sensing region of determine sensor overlapping.Computational methods are, judge S respectively
ifan-shaped two line segments of perception and an arc and S
jfan-shaped two line segments of perception and an arc whether have intersection point: first calculate line segment L
ia
iwith line segment L
ja
jwhether there is intersection point, if there is intersection point, then Returning sensor S
iand S
jsensing region overlapping; Otherwise calculate line segment L
ia
iwith line segment L
jb
jwhether there is intersection point, if there is intersection point, then Returning sensor S
iand S
jsensing region overlapping; Otherwise calculate line segment L
ia
iwith arc A
jb
jwhether there is intersection point, if there is intersection point, then Returning sensor S
iand S
jsensing region overlapping ... finally calculate arc A
ib
iwith arc A
jb
jwhether there is intersection point, if there is intersection point, then Returning sensor S
iand S
jsensing region overlapping, otherwise Returning sensor S
iand S
jsensing region not overlapping.Utilize said method to be judged by transducer as shown in Figure 3, can show that the sensing region of these two transducers is overlapping.
Strong ties bunch recognizer
Definition: as direction sensor S
iand S
jsensing region overlap each other, S
iand S
jbe called as direct strong ties.If direction sensor S
iand S
kthere is no direct strong ties, but all with S
jdirect strong ties, then claim S
iand S
kby intermediate sensor S
jstrong ties.
As shown in Figure 4, transducer B and sensors A and transducer C direct strong ties respectively, and sensing A and transducer C is by transducer B strong ties.
Definition a: strong ties bunch is a set of sensors.Each transducer in this set is with the direct strong ties of remaining transducer or by one or more transducer strong ties.
Based on above definition, we introduce strong ties bunch recognizer, and this code is as follows:
Wherein, input is the information of the transducer of all random placements, comprises node coordinate, the sensing range of transducer, the initial perceived direction of transducer, and the perception visual angle of transducer.Export C
s={ sc
1, sc
2... } and represent the transducer of all inputs form each strong ties bunch.
First create a queue Q, all input pickups are all put into initialized queue, then create a strong ties bunch, from queue, take out a transducer put into this strong ties bunch, for each transducer S newly added in up-to-date strong ties bunch
j, the sensing region that we check all residue transducers in Q whether with S
jsensing region have overlap, and by all with transducer S in Q
js put into by the transducer of direct strong ties
jin the strong ties at place bunch, if for each newly add bunch transducer, the sensing region of each transducer in Q is not overlapping with the sensing region of newly-increased each transducer, from Q, then take out transducer put into a new strong ties bunch, repeat said process, until there is no transducer in queue Q, export each strong ties bunch.
Beeline between the sensing region calculating two strong ties bunch and between the sensing region of certain strong ties bunch and right boundary
Ask strong ties bunch sc
msensing region and sc
nsensing region between beeline be by asking sc
min the sensing region of each transducer and sc
nin each transducer sensing region between beeline, finally compare the beeline between the sensing region drawing minimum value in all distances i.e. two strong ties bunch.Require transducer S
iwith S
jbeeline between sensing region, namely asks transducer S
ithe fan-shaped border of perception and transducer S
jthe fan-shaped border of perception between beeline.Ask S respectively
ifan-shaped two line segments of perception and an arc and S
jfan-shaped two line segments of perception and an arc between beeline, then compare these distances and draw minimum value and transducer S
iwith transducer S
jbeeline between sensing region.With d (s
i, s
j) represent S
iand S
jsensing region between distance, then d (s
i, s
j) can arriving by following computing formula:
Wherein, d (L
ia
i, L
ja
j) represent line segment L
ia
iwith line segment L
ja
jbetween beeline.And the point that transducer covers in sector boundary can represent with expression formula (2) (3) (4), the problem therefore calculating beeline between two lines is converted into the beeline calculating point-to-point transmission arbitrarily on line.
In like manner, the sensing region of certain strong ties bunch and the beeline of right boundary is asked to be then by asking the sensing region of each sensor node in strong ties bunch and the beeline of right boundary, the beeline of the sensing region and right boundary of then comparing all the sensors draws minimum value wherein, i.e. the sensing region of this strong ties bunch and the beeline of right boundary.Require the sensing region of transducer and the beeline of right boundary, the border namely asking the perception of transducer fan-shaped and the short distance of right boundary.Obtain the beeline of two fan-shaped line segments of the perception of transducer and an arc and right boundary respectively, then compare minimum value in distance and the sensing region of transducer and the beeline of right boundary.
Dijakstra algorithm asks required minimum number of sensors
Beeline between any two strong ties bunch sensing regions and the sensing region of each bunch and the beeline of right boundary is calculated according to the computational methods of the beeline between the sensing region of two strong ties bunch and between the sensing region of each strong ties bunch and right boundary.Suppose two strong ties bunch sc
1and sc
2sensing region on nearest point be respectively p
a=(x
a, y
a) and p
b=(x
b, y
b), therefore, strong ties bunch sc
1sensing region and sc
2the beeline of sensing region be:
For covering the minimum movable sensor quantity of the fence breach between two strong ties bunch sensing regions be
we use the maximum sensing range of movable sensor along line segment p
ap
beven deployment.Wherein l represents the maximum sensing range of movable sensor.Suppose that the perception visual angle of movable sensor is φ, if 0≤φ < π/3, then the maximum sensing range that perception is fan-shaped is radius is R; If π/3≤φ < π, the fan-shaped maximum sensing range of perception is the fan-shaped the longest string of perception, and length is: 2Rsin (φ/2); If π≤φ < 2 is π, the fan-shaped maximum sensing range of perception is the fan-shaped diameter length of perception is 2R.In like manner, the quantity of the minimum movable sensor of the breach that the sensing region for repairing right boundary and any strong ties bunch is formed can be obtained.By using dijkstra's algorithm, calculate for repairing required minimum number of sensors from left margin to right margin, and the path disposed.
Calculate the target location of movable sensor
Next provide for covering strong ties bunch sc
1and sc
2the target location method of movable sensor of fence breach that formed of sensing region.Suppose strong ties bunch sc
1and sc
2sensing region between nearest point be respectively p
a=(x
a, y
a) and p
b=(x
b, y
b).If line segment p
ap
bwith horizontal square to angle be some a p
amake the line parallel with x-axis, get p on line
athe point p on right side
cif, y
b>=y
a, then σ=∠ p
bp
ap
c; If y
b< y
a, then σ=2 π-∠ p
bp
ap
c, wherein suppose ∠ p
bp
ap
cscope be [0, π]).Then when the perception visual angle φ of movable sensor meets 0≤φ < π/3, be α=σ-φ/2 for repairing the initial perception angle of movable sensor, if now α < 0, α=α+2 π; If when the perception visual angle φ of movable sensor meets π/3≤φ < 2 π, the initial perception angle of movable sensor is α=σ+pi/2-φ/2, if now α < 0, α=α+2 π.
When 0≤φ < π/3, the x of movable sensor target location, y coordinate is respectively:
x
j=x
a-cosσ*Δ+(j-1)cosσ*(l-Δ)(7)
y
j=y
a-sinσ*Δ+(j-1)sinσ*(l-Δ)(8)
As π/3≤φ < π, the x of movable sensor target location, y coordinate is respectively
x
j=x
a-cosσ*Δ+(j-1)cosσ*(l-Δ)+R*sin(φ/2)*cosσ+R*cos(φ/2)*cos(σ+3π/2)(9)
y
j=y
a-sinσ*Δ+(j-1)sinσ*(l-Δ)+R*sin(φ/2)*sinσ+R*cos(φ/2)*sin(σ+3π/2)(10)
As π≤φ < 2 π, the x of movable sensor target location, y coordinate is respectively
x
j=x
a-cosσ*Δ+(j-1)cosσ*(l-Δ)+cosσ*R(11)
y
j=y
a-sinσ*Δ+(j-1)sinσ*(l-Δ)+sinσ*R(12)
Wherein, w (sc
1sc
2) represent minimum movable sensor quantity for covering the fence breach between two strong ties bunch:
L represents the maximum sensing range of movable sensor
j=1,2...w(sc
1,sc
2)(14)
Δ=(w(sc
1,sc
2)*l-d(sc
1,sc
2))/(w(sc
1,sc
2)+1)(15)
Two, method flow:
The method accurately can calculate the position of fence breach, and covers breach with minimum movable sensor, and it is as follows that the method specifically performs step:
Step one: the overlay area determining transducer, adopts the directional sensor network dispositions method based on straight line, disposes being fixed with to transducer in overlay area;
Step 2: the method adopting determine sensor node perceived region overlapping, judges whether the sensing region of any two movable sensors in overlay area has overlap and judge whether the sensing region of each transducer has overlapping with the right boundary of overlay area respectively;
Step 3: adopt strong ties bunch recognizer, identifies that the oriented transducer in overlay area forms each strong ties bunch;
Step 4: in calculating coverage area based any two strong ties bunch sensing region between beeline, and the point that the spacing storing the sensing region of any two strong ties bunch is the shortest, calculate the beeline between the sensing region of each strong ties bunch and right boundary, and the point that the spacing storing the sensing region of each transducer and right boundary is the shortest;
Step 5: by between strong ties bunch sensing region and the beeline of strong ties bunch between sensing region and right boundary obtain for repairing between strong ties bunch sensing region and the minimum movable sensor quantity of strong ties breach bunch between sensing region and right boundary divided by the sensing range rounding up of movable sensor;
Step 6: employing Dijakstra algorithm asks the minimum number of sensors needed for from left margin to right margin, using left margin as initial vertex, right margin is as termination summit, and using each strong ties bunch as an intermediate vertex, connect all summits, weight table on every bar limit express strong between the sensing region to connect bunch or strong ties bunch between sensing region and right boundary for repairing the minimum number of sensors needed for breach, dijkstra's algorithm is utilized to obtain from initial vertex to the minimum value of weights summation stopping summit, be the minimum value of total movable sensor quantity of repairing needed for fence breach,
Step 7: adopt formula (7)-(15), obtain target coordinate position and the start angle thereof of movable sensor, movable sensor is moved to target location, implements to repair.
Example:
Step 1: as shown in Figure 1, protection zone is set to the rectangular region of long 500 and wide 80.Adopting 20 radiuses based on the directional sensor network dispositions method of straight line is 30; perception angle is that the oriented sensor part of π/3 is deployed in protection zone: transducer scatter along this straight uniform of y=0, and the horizontal target coordinate of i-th sensor node is:
By (x
i, y
i) represent the physical location of i-th transducer.Due to the randomness of disposing, it may be with
there is deviation, S
ilevel and vertical range deviation use respectively
with
represent.Then actual sensor coordinates is
here apart from us, random error supposes that obeying average is 0, variance is σ
2gaussian Profile, establish σ=2 here, namely
and the initial perceived direction of fixation of sensor obeys to be uniformly distributed on 0 to 2 π.Suppose that we can obtain the coordinate position of sensor node, perception radius, the visual angle of perception and the start angle of perception.Transducer is numbered from 1 to 20 by abscissa according to node from small to large.
Step 2: the method adopting determine sensor node perceived region overlapping, judges whether the sensing region of any two movable sensors in overlay area has overlap and judge whether the sensing region of each transducer has overlapping with the right boundary of overlay area respectively;
Step 3: the recognition methods adopting strong ties bunch, judge all strong ties bunch that fixation of sensor is formed, in deployment diagram as shown in Figure 1, the strong ties bunch of formation has 11, transducer 1,2, and 3 form first strong ties bunch; Transducer 4 and transducer 5 form second strong ties bunch; Transducer 6,7,8 form the 3rd strong ties bunch; Transducer 9,10 form the 4th strong ties bunch; Transducer 11 forms the 5th strong ties bunch; Transducer 12 forms the 6th strong ties bunch; Transducer 13,14,15 form the 7th strong ties bunch; Transducer 16 forms the 8th strong ties bunch, transducer 17, and 18 form the tenth strong ties bunch, and transducer 19 forms the 11 strong ties bunch, and transducer 20 forms the 11 strong ties bunch.
Step 4: the beeline between the overlay area calculating any two strong ties bunch, and the point that the spacing storing the overlay area of any two strong ties bunch is the shortest, calculate the beeline between the overlay area of each strong ties bunch and right boundary, and the point that the spacing storing the overlay area of each transducer and right boundary is the shortest.Step 5: beeline rounded up divided by the maximum sensing range of movable sensor, obtains the minimum movable sensor quantity for repairing between any two strong ties bunch overlay areas and needed for the breach of strong ties bunch between overlay area and right boundary.
Step 6: utilize dijkstra's algorithm to obtain minimum movable sensor quantity for repairing and overlay path, as shown in Figure 5, one article of the shortest overlay path is: left margin → the first strong ties bunch → second strong ties bunch → the 3rd strong ties bunch → the 4th strong ties bunch → the 7th strong ties bunch → the 9th strong ties bunch → the 11 strong ties bunch → right margin, needs nine movable sensors altogether.
Step 7: adopt formula (7)-(15), ask the target location and start angle thereof that calculate movable sensor, movable sensor is moved to target location, implements to repair.Result as shown in Figure 5.