Summary of the invention
Technical problem: in fence covering, when number of sensors is inadequate or some sensors break down or exhaust energy
When, fence notch is likely to appear in the sensor network of random placement.The present invention is in the research strong grid of wireless sensor network
A kind of directional sensor network grid based on mobile node are proposed on the basis of the characteristics of column covering and strong fence covering algorithm
Column restorative procedure, so that movable sensor minimum number used.
Technical solution: there is a large amount of challenge in the directional sensor network fence notch recovery technique based on mobile node
The problem of.Firstly because the limited viewing angle of oriented sensor, and the perceived direction of fixed sensor is skimble-scamble, judgement two
Whether the sensing region of a sensor is overlapped, and it is complicated for the distance between calculating two sensors;Second, due to
Sensor is random placement, after initial covering, is calculated in the number for being formed by strong ties cluster and each cluster of identification
Specific sensor node have challenge;Third, it is at high cost more than fixed sensor to manufacture the cost of movable sensor,
This promotes us to use movable sensor as few as possible.Therefore, movable sensor as few as possible and fixed sensing are found
Device forms the technical problem underlying that fence covering is also the invention.
The present invention disposes sensor node using the sensor portion arranging method based on straight line first, by judging two sensings
The method whether sensing region of device has overlapping, to determine whether the overlay area of any two sensor in protection zone has weight
It is folded, according to application of results strong ties cluster recognizer is determined, identify that the fixation sensor of random distribution is formed by each strong pass
Join cluster, then calculates between any two strong ties cluster and each strong ties cluster is respectively with the shortest distance of right boundary, it will be most short
Distance divided by the maximum sensing range and rounding up of mobile sensor node obtain for repair any two strong ties cluster it
Between and the notch that is formed of each strong ties cluster and right boundary needed for minimum movable sensor quantity, then utilize Dijkstra
Algorithm finds out required total minimum movable sensor quantity and finds out target coverage position, is finally moved to movable sensor
Target coverage position.
Directional sensor network fence restorative procedure based on mobile node of the invention specifically executes that steps are as follows:
Step 1: determining the overlay area of sensor, using the directional sensor network dispositions method based on straight line, is covering
Deployment is fixed with to sensor in cover area;
Step 2: using the method for determining the overlapping of sensor node sensing region, determine that any two are moved in overlay area
Whether the sensing region of dynamic sensor has the sensing region of overlapping and each sensor of the judgement left and right with overlay area respectively
Whether boundary has overlapping;
Step 3: using strong ties cluster recognizer, identifies that the oriented sensor in overlay area is formed and each connects by force
Connect cluster;
Step 4: the shortest distance in overlay area between any two strong ties cluster sensing region is calculated, and stores and appoints
Anticipate the shortest point of distance between two strong ties cluster sensing regions, calculate each strong ties cluster sensing region and right boundary it
Between the shortest distance, and store the shortest point of distance between the sensing region and right boundary of each sensor;
Step 5: will be most short between the sensing region of strong ties cluster and between the sensing region and right boundary of strong ties cluster
Distance divided by the maximum sensing range and rounding up of movable sensor obtain for repair between strong ties cluster sensing region with it is strong
Connect the minimum movable sensor quantity of notch between cluster sensing region and right boundary;
Step 6: the minimum number of sensors needed for being asked from left margin to right margin using Dijakstra algorithm, by the left side
Boundary connects all tops as termination vertex, and using each strong ties cluster as an intermediate vertex as initial vertex, right margin
Point, the weight in each edge indicate between strong ties cluster and strong ties cluster or right boundary for repairing minimum sensing needed for notch
Device quantity finds out the minimum value from initial vertex to the weight summation for terminating vertex, as reparation grid using dijkstra's algorithm
The minimum value of total number of sensors needed for column notch;
Step 7: target position and its start angle α of movable sensor are found outi, movable sensor is moved to target
Repairing is implemented in position.
Wherein, the target position of the movable sensor and its calculation method of start angle are as follows:
Assuming that strong ties cluster sc1And sc2Sensing region between nearest point be respectively pa=(xa,ya) and pb=(xb,yb);
If line segment papbWith horizontal square to angle be σ then when movable sensor perception visual angle φ meet 0≤φ < π/3 when, use
Perceiving angle [alpha] in the starting for repairing movable sensor is-φ/2 σ, if+2 π of α < 0 at this time, α=α;If working as the sense of movable sensor
Know that visual angle φ meets π/3≤2 π of φ <, the starting perception angle [alpha] of movable sensor is σ+pi/2-φ/2, if α < 0 at this time, α=α
+2π;
σ's asks method as follows: crossing point paThe line parallel with x-axis is made, takes p on lineaThe point p on right sidecIf yb≥ya, then σ=∠
pbpapc;If yb< ya, then π-the ∠ of σ=2 pbpapc, wherein ∠ pbpapcRange be [0, π];
As 0≤φ < π/3, the x of movable sensor target position, y-coordinate is respectively as follows:
xj=xa-cosσ*Δ+(j-1)cosσ*(l-Δ)
yj=ya-sinσ*Δ+(j-1)sinσ*(l-Δ)
As π/3≤φ < π, the x of movable sensor target position, y-coordinate is respectively
xj=xa-cosσ*Δ+(j-1)cosσ*(l-Δ)+R*sin(φ/2)*cosσ+R*cos(φ/2)*cos(σ+3π/
2)
yj=ya-sinσ*Δ+(j-1)sinσ*(l-Δ)+R*sin(φ/2)*sinσ+R*cos(φ/2)*sin(σ+3π/
2)
As π≤φ 2 π of <, the x of movable sensor target position, y-coordinate is respectively
xj=xa-cosσ*Δ+(j-1)cosσ*(l-Δ)+cosσ*R
yj=ya-sinσ*Δ+(j-1)sinσ*(l-Δ)+sinσ*R
Wherein, R is the perception radius of movable sensor, and l indicates the maximum sensing range of movable sensor, j=1,2...w
(sc1,sc2), Δ is the overlapping spacing of adjacent movable sensor:
Δ=(w (sc1,sc2)*l-d(sc1,sc2))/(w(sc1,sc2)+1)
w(sc1,sc2) indicate the minimum movable sensor quantity for being used to cover the fence notch between two strong ties clusters:d(sc1,sc2) it is pa,pbBetween distance, i.e.,
The utility model has the advantages that the invention proposes a kind of directional sensor network fence restorative procedure based on mobile node,
It studies the characteristics of strong fence of wireless sensor network covers and realizes the reparation of fence notch on the basis of strong fence covering algorithm, make
Obtain movable sensor minimum number used.
Specific embodiment
One, architecture
The present invention is mainly made of four parts, first is that introducing the directional sensor network dispositions method based on straight line;Two
It is to introduce to determine two sensor node SiAnd SjSensing region whether have the method for overlapping, that is, use theorem: direction sensor
SiAnd SjSensing region it is overlapped, and if only if SiFan-shaped two radiuses and an arc and S of perceptionjPerception it is fan-shaped
Two radiuses and an arc there are at least one intersection points.When whether determine the overlay area of two sensors has overlapping, consider
By sensor SiAnd SjThe fan-shaped boundary of perception showed with expression formula, then establish an equation and come whether Decision boundaries have intersection point
To determine whether the sensing region of two sensors has overlapping;Third is that according to determining whether the sensing region of two sensors has weight
Folded method, determines whether the sensing region of the fixed sensor node of any two in protection zone has overlapping, and utilizes and connect by force
It connects cluster recognizer and identifies all strong ties clusters;Fourth is that using dijkstra's algorithm calculate needed for minimum number of sensors and
The target shift position of movable sensor, and gap repair is carried out using movable sensor.
Directional sensor network dispositions method based on straight line
Present invention contemplates that N number of fixed sensor is according to the rectangle for being deployed in long L He width H based on straight line dispositions method
In region.Relative to being uniformly distributed, the deployment based on straight line can largely reduce sensor density.It is being based on straight line portion
In the case where administration, sensor spreads out along a specific straight uniform, such as y=0 this straight line, i-th of sensor
The horizontal target coordinate of node are as follows:
By (xi,yi) indicate i-th of sensor physical location.Due to the randomness of deployment, it may be withIt deposits
In deviation, SiLevel and vertical range deviation use respectivelyWithIt indicates.Then actual sensor coordinates areHere random error distance we assume that obey mean value be 0, variance σ2Gaussian Profile, i.e.,And fixing sensor starting perceived direction is to obey to be uniformly distributed on 0 to 2 π.Assuming that we can
To obtain the coordinate position of sensor node, the perception radius, the visual angle of perception and the start angle of perception.Fig. 1 is using base
The deployment obtained from the sensor deployment strategy of straight line is disposed as a result, in the deployment, sensor along y=0 this
Lineal layout is in long 500 wide 80 protection zone.
Determine two sensor node SiAnd SjThe method that whether is overlapped of sensing region
Strong fence covering algorithm research be can be by sensor when invader passes through protection zone along arbitrary trajectory
The problem of network acquisition.Deployer constructs one using a series of sensing region of sensors and passes through the continuous of protection zone boundary
Fence can be detected when guaranteeing that all invaders pass through protection zone.The sensing region of sensor is set to form a company
The overlay area of continuous fence line, adjacent sensors need to have overlapping.In oriented sensor node two dimension sensor model, if there is
To sensor SiAnd SjSensing region it is overlapped, and if only if SiThe fan-shaped boundary and S of perceptionjThe fan-shaped side of perception
There are at least one intersection points, i.e. S on boundaryiFan-shaped two radiuses and an arc and S of perceptionjFan-shaped two radiuses of perception and
There are at least one intersection points for one arc.How two sensor Ss are determinediAnd SjWhether to have overlapping be that strong fence covers for overlay area
Major issue in lid.Consider SiAnd SjThe fan-shaped boundary of perception showed with expression formula, then establish an equation to determine side
Whether boundary has intersection point to determine SiAnd SjSensing region whether have overlapping.
By the abstract of the oriented sensor node perceptual performance to reality it is found that the perception of node has directionality, and
The limited viewing angle system of perception, so it using node is the center of circle, perceived distance for radius that its sensor model, which is one on two-dimensional surface,
It is fan-shaped.As shown in Fig. 2, node directional sensing model model uses four-tuple (L on two-dimensional surfacei,R,αi, φ) and it indicates.Wherein,
Li(xi,yi) it is coordinate of the oriented sensor node on two-dimensional surface, R is the perception radius of node, αiFor the starting of the node
Perceived direction, φ are the perception visual angle of sensor node.
As shown in Fig. 2, Li,Ai,BiFor sensor SiThree vertex on sensor model, two lines section LiAi,LiBiWith one
Arc AiBiConstitute SiCover fan-shaped boundary.We useIndicate SiThe fan-shaped boundary of perception, then AiAnd BiIt can be distinguished
It indicates are as follows:
(xi+Rcosαi,yi+Rsinαi) and (xi+Rcos(αi+φ),yi+Rsin(αi+φ))。
Postulated point P (x, y) is in line segment LiAiOn, point Q (u, v) is in line segment LiBiOn, point R (w, z) is in arc AiBiOn, then P, Q,
R should meet equation respectively:
Sensor SjBorderline point can also be indicated with similar equation.As sensor SiAnd SjSensing region overlapping,
SiAnd SjThe fan-shaped boundary of perceptionWithAt least there is an intersection point.Therefore, we pass through judgementWithIt whether there is
Intersection point determines whether the sensing region of sensor is overlapped.Calculation method is to judge S respectivelyiThe fan-shaped two lines section of perception
With an arc and SjThe fan-shaped two lines section and an arc of perception whether have intersection point: calculating line segment L firstiAiWith line segment LjAjIt is
It is no there are intersection point, intersection point if it exists, then Returning sensor SiAnd SjSensing region overlapping;Otherwise line segment L is calculatediAiAnd line segment
LjBjWith the presence or absence of intersection point, intersection point if it exists, then Returning sensor SiAnd SjSensing region overlapping;Otherwise line segment L is calculatediAiWith
Arc AjBjWith the presence or absence of intersection point, intersection point if it exists, then Returning sensor SiAnd SjSensing region overlapping ... finally calculate arc
AiBiWith arc AjBjWith the presence or absence of intersection point, intersection point if it exists, then Returning sensor SiAnd SjSensing region overlapping, otherwise return pass
Sensor SiAnd SjSensing region be not overlapped.Sensor as shown in Figure 3 is determined using the above method, it can be deduced that this
The sensing region overlapping of two sensors.
Strong ties cluster recognizer
Definition: as direction sensor SiAnd SjSensing region overlap each other, SiAnd SjReferred to as direct strong ties.If
Direction sensor SiAnd SkThere is no a direct strong ties, but all with SjDirect strong ties, then claim SiAnd SkPass through intermediate sensor SjBy force
Connection.
As shown in figure 4, sensor B and sensors A and sensor C distinguish direct strong ties, and it is logical to sense A and sensor C
Cross sensor B strong ties.
Definition: a strong ties cluster is a set of sensors.Each sensor and remaining biography in this set
The direct strong ties of sensor pass through one or more sensors strong ties.
Based on defined above, we introduce strong ties cluster recognizer, and the code is as follows:
Wherein, input is the information of the sensor of all random placements, including node coordinate, the sensing range of sensor,
The starting perceived direction of sensor and the perception visual angle of sensor.Export CS={ sc1,sc2... } and indicate all inputs
Sensor forms each strong ties cluster.
A queue Q is created first, all input pickups are all put into the queue of initialization, then creates one
Strong ties cluster is put into the strong ties cluster from a sensor is taken out in queue, for each new newest strong ties cluster of addition
In sensor Sj, we check in Q it is all residue sensors sensing region whether with SjSensing region have an overlapping, and by Q
In it is all with sensor SjThe sensor of direct strong ties is put into SjIn the strong ties cluster at place, if for each new addition
The sensor of cluster, the sensing region and the sensing region of newly-increased each sensor of each sensor in Q be not be overlapped, then from
A sensor is taken out in Q to be put into a new strong ties cluster, is repeated the above process, it is defeated until there is no sensor in queue Q
Each strong ties cluster out.
Calculate between the sensing region of two strong ties clusters and the sensing region of some strong ties cluster and right boundary it
Between the shortest distance
Seek strong ties cluster scmSensing region and scnSensing region between the shortest distance be by seeking scmIn it is every
The sensing region of a sensor and scnIn each sensor sensing region between the shortest distance, finally compare obtain it is all away from
The shortest distance between the sensing region of minimum value i.e. two strong ties cluster from.It is required that sensor SiWith SjBetween sensing region
The shortest distance seeks sensor SiThe fan-shaped boundary and sensor S of perceptionjThe fan-shaped boundary of perception between the shortest distance.
S is sought respectivelyiDuan Yuyi arc of perception sector two lines and SjThe fan-shaped Duan Yuyi arc of two lines of perception between most short distance
From then comparing these distances and obtain minimum value i.e. sensor SiWith sensor SjThe shortest distance between sensing region.With d (si,
sj) indicate SiAnd SjSensing region between distance, then d (si,sj) can arriving with following calculation formula:
Wherein, d (LiAi,LjAj) indicate line segment LiAiWith line segment LjAjBetween the shortest distance.And sensor covers sector boundary
On point can with expression formula (2) (3) (4) indicate, therefore calculate two lines between the shortest distance the problem of be converted into calculating line
The shortest distance of upper any point-to-point transmission.
Similarly, the shortest distance of the sensing region and right boundary of seeking some strong ties cluster is then by asking in strong ties cluster
Each sensor node sensing region and right boundary the shortest distance, then compare the sensing regions of all the sensors with
The shortest distance of right boundary obtains minimum value therein, the i.e. most short distance of the sensing region of the strong ties cluster and right boundary
From.It is required that the sensing region of sensor and the shortest distance of right boundary, that is, the boundary and left and right for asking the perception of sensor fan-shaped
The short distance on boundary.The shortest distance of two lines Duan Yuyi arc and right boundary of the perception sector of sensor is found out respectively,
Then compare the minimum value i.e. sensing region of sensor in distance and the shortest distance of right boundary.
Dijakstra algorithm seeks required least number of sensors
According between the sensing region of the two strong ties clusters and sensing region of each strong ties cluster and right boundary it
Between the shortest distance calculation method calculate any two strong ties cluster sensing region between the shortest distance and each cluster sense
Know the shortest distance of region and right boundary.Assuming that two strong ties cluster sc1And sc2Sensing region on nearest point be respectively
pa=(xa,ya) and pb=(xb,yb), therefore, strong ties cluster sc1Sensing region and sc2Sensing region the shortest distance are as follows:
Minimum movable sensor quantity for covering the fence notch between two strong ties cluster sensing regions isWe are with the maximum sensing range of movable sensor along line segment papbUniformly deployment.Wherein l
Indicate the maximum sensing range of movable sensor.Assuming that the perception visual angle of movable sensor is φ, if π/3 0≤φ <, perceive
It is R that fan-shaped maximum sensing range, which is radius,;It is that perception is fan-shaped that fan-shaped maximum sensing range is perceived if π/3≤φ < π
Longest string, length are as follows: 2Rsin (φ/2);It is the straight of perception sector that fan-shaped maximum sensing range is perceived if 2 π of π≤φ <
Electrical path length is 2R.Similarly, the sensing region for repairing right boundary and any strong ties cluster can be found out and be formed by notch
Minimum movable sensor quantity.By using dijkstra's algorithm, calculate from left margin to right margin for needed for repairing
Minimum number of sensors, and deployment path.
Calculate the target position of movable sensor
Next it provides for covering strong ties cluster sc1And sc2Sensing region formed fence notch movable sensor
Target position method.Assuming that strong ties cluster sc1And sc2Sensing region between nearest point be respectively pa=(xa,ya) and pb=
(xb,yb).If line segment papbWith horizontal square to angle be point paThe line parallel with x-axis is made, takes p on lineaRight side
Point pcIf yb≥ya, then σ=∠ pbpapc;If yb< ya, then π-the ∠ of σ=2 pbpapc, wherein assuming ∠ pbpapcRange be [0,
π]).Then when the perception visual angle φ of movable sensor meets 0≤φ < π/3, the starting for repairing movable sensor perceives angle
Degree is-φ/2 α=σ, if+2 π of α < 0 at this time, α=α;If the perception visual angle φ when movable sensor meets π/3≤2 π of φ <, move
The starting perception angle of dynamic sensor is α=σ+pi/2-φ/2, if+2 π of α < 0 at this time, α=α.
As 0≤φ < π/3, the x of movable sensor target position, y-coordinate is respectively as follows:
xj=xa-cosσ*Δ+(j-1)cosσ*(l-Δ) (7)
yj=ya-sinσ*Δ+(j-1)sinσ*(l-Δ) (8)
As π/3≤φ < π, the x of movable sensor target position, y-coordinate is respectively
xj=xa-cosσ*Δ+(j-1)cosσ*(l-Δ)+R*sin(φ/2)*cosσ+R*cos(φ/2)*cos(σ+3π/2) (9)
yj=ya-sinσ*Δ+(j-1)sinσ*(l-Δ)+R*sin(φ/2)*sinσ+R*cos(φ/2)*sin(σ+3π/2) (10)
As π≤φ 2 π of <, the x of movable sensor target position, y-coordinate is respectively
xj=xa-cosσ*Δ+(j-1)cosσ*(l-Δ)+cosσ*R (11)
yj=ya-sinσ*Δ+(j-1)sinσ*(l-Δ)+sinσ*R (12)
Wherein, w (sc1sc2) indicate the minimum movable sensor quantity for being used to cover the fence notch between two strong ties clusters:
The maximum sensing range of l expression movable sensor
J=1,2...w (sc1,sc2) (14)
Δ=(w (sc1,sc2)*l-d(sc1,sc2))/(w(sc1,sc2)+1) (15)
Two, method flow:
This method can accurately calculate the position of fence notch, and cover notch, this method with least movable sensor
Steps are as follows for specific execution:
Step 1: determining the overlay area of sensor, using the directional sensor network dispositions method based on straight line, is covering
Deployment is fixed with to sensor in cover area;
Step 2: using the method for determining the overlapping of sensor node sensing region, determine that any two are moved in overlay area
Whether the sensing region of dynamic sensor has the sensing region of overlapping and each sensor of the judgement left and right with overlay area respectively
Whether boundary has overlapping;
Step 3: using strong ties cluster recognizer, identifies that the oriented sensor in overlay area is formed and each connects by force
Connect cluster;
Step 4: the shortest distance in overlay area between the sensing region of any two strong ties cluster is calculated, and is stored
The shortest point of distance between the sensing region of any two strong ties cluster calculates sensing region and the left and right side of each strong ties cluster
The shortest distance between boundary, and store the shortest point of distance between the sensing region and right boundary of each sensor;
Step 5: by the shortest distance between strong ties cluster sensing region and between strong ties cluster sensing region and right boundary
Divided by the sensing range and rounding up of movable sensor obtain for repair between strong ties cluster sensing region with strong ties cluster sense
Know the minimum movable sensor quantity of notch between region and right boundary;
Step 6: the minimum number of sensors needed for being asked from left margin to right margin using Dijakstra algorithm, by the left side
Boundary connects all tops as termination vertex, and using each strong ties cluster as an intermediate vertex as initial vertex, right margin
Point, the weight in each edge indicate between the sensing region of strong ties cluster or between strong ties cluster sensing region and right boundary for repairing
Minimum number of sensors needed for multiple notch is found out using dijkstra's algorithm from initial vertex to the weight summation for terminating vertex
Minimum value, the as minimum value of total movable sensor quantity needed for reparation fence notch;
Step 7: formula (7)-(15) are used, the target coordinate position and its start angle of movable sensor is found out, will move
Dynamic sensor is moved to target position, implements repairing.
Example:
Step 1: as shown in Figure 1, protection zone is set as long 500 and wide 80 rectangular region.Using based on straight line
20 radiuses are 30 by directional sensor network dispositions method, and perception angle is the oriented sensor deployment of π/3 in protection zone
In: sensor scatter along this straight uniform of y=0, the horizontal target coordinate of i-th of sensor node are as follows:
By (xi,yi) indicate i-th of sensor physical location.Due to the randomness of deployment, it may be withIt deposits
In deviation, SiLevel and vertical range deviation use respectivelyWithIt indicates.Then actual sensor coordinates are
Here random error distance we assume that obey mean value be 0, variance σ2Gaussian Profile, set σ=2 here, i.e.,And fixing sensor starting perceived direction is to obey to be uniformly distributed on 0 to 2 π.Assuming that we can be with
Obtain the coordinate position of sensor node, the perception radius, the visual angle of perception and the start angle of perception.According to the horizontal seat of node
Mark from small to large numbers sensor from 1 to 20.
Step 2: using the method for determining the overlapping of sensor node sensing region, determining that any two are mobile in overlay area
Whether the sensing region of sensor has the sensing region of overlapping and each sensor of the judgement left and right side with overlay area respectively
Whether boundary has overlapping;
Step 3: using the recognition methods of strong ties cluster, determining that fixed sensor is formed by all strong ties clusters, such as Fig. 1
Shown in deployment diagram, the strong ties cluster of formation has 11, and sensor 1,2,3 forms first strong ties cluster;Sensor 4 and biography
Sensor 5 forms second strong ties cluster;Sensor 6,7,8 forms third strong ties cluster;Sensor 9,10 forms the 4th strong
Connect cluster;Sensor 11 forms the 5th strong ties cluster;Sensor 12 forms the 6th strong ties cluster;13,14,15 shape of sensor
At the 7th strong ties cluster;Sensor 16 forms the 8th strong ties cluster, and sensor 17,18 forms the tenth strong ties cluster, passes
Sensor 19 forms the 11st strong ties cluster, and sensor 20 forms the 11st strong ties cluster.
Step 4: calculating the shortest distance between the overlay area of any two strong ties cluster, and store any two and connect by force
The shortest point of distance between the overlay area of cluster is connect, is calculated most short between the overlay area and right boundary of each strong ties cluster
Distance, and store the shortest point of distance between the overlay area and right boundary of each sensor.Step 5: the shortest distance is removed
It with the maximum sensing range of movable sensor and rounds up, obtains for repairing between any two strong ties cluster overlay area
And minimum movable sensor quantity needed for the notch between strong ties cluster overlay area and right boundary.
Step 6: finding out the minimum movable sensor quantity and overlay path for reparation using dijkstra's algorithm, such as
Shown in Fig. 5, a shortest overlay path are as follows: left margin → the first strong ties cluster → the second strong ties cluster → third is strong
Connect cluster → four strong ties cluster → seven strong ties cluster → nine strong ties cluster → 11st strong ties cluster → right side
Boundary needs nine movable sensors altogether.
Step 7: using formula (7)-(15), ask the target position for calculating movable sensor and its start angle, will move
Sensor is moved to target position, implements repairing.As a result as shown in Figure 5.