Detecting the Boundary of Sensor Networks from Limited Cyclic Information

We address the problem of finding the boundaries of a set of points by using a limited range-cyclic order detector. This sensor, denoted by lrcod, is able to detect nearby objects and enumerate them by their cyclic order; neither distance nor the angular position of each object is provided. Boundaries are important in many applications such as detecting the breakdown of networks, insufficient coverage or connectivity, abnormal functioning sensors, and virtual coordinates for routing. We studied the information space of the lrcod sensors and established their capabilities to find inner and outer boundaries. Our proposed approach uses local information to recognize points on the boundary. To discover the complete boundary we define the Right Hand Without Crossings (RHWoC) rule. We also provide a correctness proof of this rule. The experimental evaluation confirms the effectiveness to find the boundary of large sensor networks.


Introduction
Sensor networks can be seen as a large collection of nodes that reason about the state of the world, that is, their environment.Distributed sensing improves the signal-to-noise ratio because sensors are closer to the phenomena.Obtaining the boundary of a sensor network is important in many engineering applications.Boundaries are useful to detect the breakdown of a network, insufficient coverage or connectivity, abnormal functioning sensors, virtual coordinates for routing, and so forth.Boundary recognition is a challenging issue in wireless sensor networks [1].The distinction between inner and boundary nodes of the network can provide valuable knowledge to a broad spectrum of algorithms.In practice, sensors are deployed randomly in a given area.Even if the initial deployment is known, the topology may vary because of sensors failure.Furthermore, many applications require dynamic sensors.
Ad hoc networks are often modeled as unit disk graphs (UDG), where each point can reach other points in a given radius .Accurately defining the boundary of a UDG without a general position system (GPS) is a challenge that should not be underestimated.
The problem we address in this paper is to find the boundaries of a set of points by using a limited range-cyclic order detector.This sensor, denoted by lrcod, can detect nearby objects and enumerate them by their cyclic order; neither distance nor the angular position of each object is provided.The lrcod sensor only measures the cyclic order, unlike bearing measurement systems, where the angle of each object is known.lrcod network can be implemented from visual sensors with miniaturized omnidirectional systems [2,3].Another implementation could use infrared based relative positioning sensors specially designed to enable interrobot spatial coordination [4,5].
Although the model studied in this paper considers a sensor network as its main application, many ideas developed here could be applied to other areas such as mobile robots.For mobile robots, landmarks are like sensors in a network, and the robot provides the communication link between them.Tovar et al. [6] consider a robot that moves in the plane and that is able to sense only the cyclic order of landmarks with respect to its current position.In contrast to [6], which considers an infinite range sensor model, this paper studies a sensor that can only detect objects at a maximum range of .A limited sensing model is more convenient for real applications; for example, laser scans have a maximum range, walls in indoor environments can occlude some objects, and so forth.
The rest of the paper is organized as follows: Section 2 introduces some basic definitions used along this paper.Section 3 describes the assumed network model and defines the problem.Section 4 describes how to detect a single point on a boundary and using it to recover the complete boundary.Section 5 describes the simulations and results obtained from the proposed algorithm, showing that it works under different conditions.Section 6 describes the related work.Finally, Section 7 concludes this work.

Basic Definitions
lrcod is a sensor that gives the counterclockwise cyclic permutations of other sensors or landmark labels.This sensor is able to see landmarks only within a given distance; for a given sensor the parameter  is the maximum range at which the cyclic order detector can sense a landmark.Henceforth, lrcod(x) is a function that returns the readings of the sensor; those readings are permutations of the set of sensor identifiers as seen from the point x ∈ R 2 .Figure 1 illustrates an example of the sequences of landmarks detected from two positions lrcod( A set of landmarks is in R 2 .Let  = (, ) be a connected graph where  is the set of landmark labels and  = {{x, y} | x, y ∈ , ‖x, y‖ ≤ } with (y ̸ = x); here ‖⋅, ⋅‖ denotes the Euclidean distance between two points.An edge between two landmarks x, y ∈  means that lrcod can detect the landmark y from landmark x and vice versa.We assume that graph  is connected; therefore every landmark is detectable from at least one other landmark.
Circular Sector.Given two landmarks V  and V  seen from V x , we define Λ  (V x ; V  , V  ) as the points within the counterclockwise circular sector V  V x V  .Let the output of the sensor be of the form lrcod(V x ) = [, V  , , V  , ], in which , , and  are subsequences of lrcod(V x ) separated by the labels corresponding to landmarks V  and V  ; then Λ  (V x ; V  , V  ) =  and Λ  (V x ; V  , V  ) =  + , where + is the concatenation of two sequences.
The sensor V  shown in Figure 2 reads lrcod( whose components are alternately vertices and edges of  (not necessarily distinct), such that V  and V +1 are the ends of edge   , 0 ≤  ≤ ℓ − 1 [7].We say that  connects the initial point V 0 to the final point V ℓ and refer to  as a V 0 V ℓ -walk or simply V 0 V ℓ .A walk in a graph is closed if its initial and terminal vertices are identical.In case of no confusion we use the succession of vertices  = ; up to a cyclic permutation, landmark 2 cannot be detected because it is outside the reach of the sensor; analogously, lrcod( Only the cyclic order is preserved; the sensed angular position of each landmark may be quite different from the real one.
The vertices of a closed walk also define a polygon .
of points in the plane.The set of edges of a polygon is () = {  |  = 0, . . ., −1}, where   is defined as an edge connecting V  and V (+1 mod ) .
Simple Polygon.A simple polygon is a polygon composed of nonrepeating vertices where none of its edges   and   , for  ̸ = , intersect at points different from their extremes.The Jordan curve theorem states that every simple closed curve divides the plane into an interior region bounded by the curve and an unbounded region containing all exterior points.

Weakly Simple Polygon.
A polygon  is weakly simple if, for any  > 0, there is a simple closed curve  such that  F (, ) < , where  F is the Fréchet distance [8] between two polygons  and .
In other words, a polygon is weakly simple if it can be made simple by an arbitrarily small perturbation of the entire curve.Informally, a weakly simple polygon is a polygon in which sides can touch each other but cannot cross.Any weakly simple polygon  partitions R 2 \  into two regions: interior and exterior.-Polygon.A -polygon  is a weakly simple polygon where ‖  ‖ ≤  for all   ∈ ().-Boundary.A -boundary or outer boundary  of a set of points  is a -polygon such that  \  lies in the interior of .
Diagonal.A diagonal is a line that connects two nonconsecutive vertices of a polygon; an inner diagonal lies totally in the interior of the polygon.
Hole.A hole or inner boundary is an empty -polygon with vertices  ⊂  such that every inner diagonal is larger than .A hole with  = || vertices will be called -hole.

Network Model
Throughout this paper, we consider sensor networks that satisfy the following assumptions.
(i) The system is composed of a set of sensors , located in a region  ⊂ R 2 ; each sensor V ∈  has a distinctive identity.(ii) Every sensor V ∈  is able to detect lrcod(V).(iii) All wireless sensors have the same maximum transmission range .
Assumptions (i) and (iii) involve that each sensor can gather information from other sensors within its transmission range.Therefore, we can build a network graph whose vertices correspond to the labeled nodes and whose edges correspond to communication links.Henceforth, we will indistinctly call them sensors, nodes, or landmarks.
Assumption (i) admits that sensors can move arbitrarily in  but they are static for a period of time  long enough to recover the boundaries.Furthermore, we assume that landmarks are in general position (i.e., no three landmarks are collinear).Assumption (iii) is usual in ad hoc networks modeled as unit disk graphs (UDG), where each point can reach other points in a given radius .
Problem Definition.Given a network  of lrcod sensors, find the boundary polygon of  and its holes by using only the local information provided by the lrcod sensors.
The task we are solving is to find the perimeter of a set of points; this task can be done by simply following the sequence of extreme points on the convex hull.Classical algorithms such as the Graham Scan [9] can be used to find the convex hull (CH) of the point set.
Unfortunately, following it by using the limited rangecyclic order detector is in certain cases impossible, because the distance between two consecutive extreme points could be greater than the maximum range of the sensor.Hence, when following the CH of the set of lrcod sensors, the algorithm can reach a position where the sensor cannot see the next point in the CH, so it has to share information through other points inside the CH (points at sight) until the next point on the CH (not at sight before) is reached.Once it has done so, it can continue finding points on the CH.This approach is time consuming and sometimes unnecessary.

Proposed Algorithm
The proposed approach finds points on the boundary following the procedure described in Section 4.1.Those points can be used as seeds to find the complete sequence of points on the boundary, as described in Section 4.2.

Boundary Points.
This subsection presents a series of definitions and lemmas that are the basis for discerning boundary from inner points.According to our definition of holes a -polygon  formed by less than four points cannot be a boundary; hence, three connected points on the vertices of a triangle cannot form a hole; therefore, a hole must have at least four landmarks.

Detecting a
Boundary from -Points.This subsection addresses how to use -points as seeds to find the boundary sequence.
Let ℎ  and ℎ +1 be two consecutive points on the convex hull and let (ℎ  , ℎ +1 ) be the line segment joining them.Since the graph  is connected, there exists at least one ℎ  ℎ +1 -walk.We are looking for the walk such that the area comprised by   := ℎ  ℎ +1 (ℎ +1 , ℎ  )ℎ  does not contain any landmark V ∈ ; we refer to the walk that satisfies this condition as a pocket.
The right-hand rule (RH) is a heuristic rule that has been used extensively to deliver packages in ad hoc networks [10].It has also been used to find the convex hull for an unlimited cyclic sensor [6].The right-hand rule states that if the last two previously visited vertices of a walk are V −1 , V  then the next vertex is the first vertex that appears immediately by turning right from the edge (V −1 , V  ).When the greedy multi-hop forwarding algorithm gets stuck, the right hand rule can be used to go around holes.
To complete a boundary starting from a border walk, we define the Right Hand Without Crossings (RHWoC)rule.Given a partial walk , the RHWoC rule selects the first landmark V  in lrcod(V  ) that follows V −1 in the permutation such that the edge   := (V  , V  ) does not intersect at a single point to any previous edge in the walk.To illustrate the RHWoC rule, Figure 4 shows an example to find the next point of the walk  = V 1  12 V 2  24 V 4  46 V 6 .When the point V 6 is analyzed, V 3 appears in the permutation immediately after point V 4 but it is not selected because the edge (V 6 , V 3 ) intersects the boundary; then the correct point V 5 is selected.

Discovering Intersections.
The RHWoC rule selects an edge that does not cross any previous edge in the border walk, but the border walk  could be a long sequence of vertices and edges.The following lemma states that when two edges intersect at a single point, at least one vertex of an edge must see at least one vertex of the other edge.

Lemma 1.
Let   = (V  , V  ) and   = (V  , V  ) be two edges, and let lrcod , := lrcod(V  ) ∪ lrcod(V  ) be the landmarks seen from Proof.When   and   intersect at a single point , there exist two points and ‖V  ‖ ≤ /2.From the law of cosines it can be shown that ‖V  , V  ‖ ≤ ; in other words, V  ∈ lrcod(V  ).
We are interested in determining if two different edges intersect in a single point.When discovering crossing edges, the endpoints of two edges could be the same; hence, there is only one rather than two distinct edges.This condition is easily detectable and can be used to discover connectivity issues of the network such as bridges and articulation points [11].
Lemma 2 states how to use the information provided by lrcod to detect that two edges in a walk intersect in a single point.

Proof. Figure 5(a) illustrates this lemma for
In other words, a walk of four consecutive boundary points can be found from two consecutive -points.
Proof.Corollary 3 follows directly from Lemma 2. In Figure 5(b), the edge (V  , V  ) does not cross any edge when Observation 1.It is always possible to define intersections for a walk with four or more vertices by using Lemma 2.
Although it is useful to find inner diagonals of a hole, -points are better to find points on the boundary when two consecutive points on the convex hull cannot see each other.Sometimes small holes do not have detectable points; for instance, the 4-hole shown in Figure 3(a) can be detected because 3(b).Those undetectable cases never occur for points on the convex hull.Observation 2. If there is only a single -point (a walk with three points instead of four) then Corollary 3 can be used.We can define some other cases such as that shown in Figure 5(c) where Unfortunately, the limited range of the sensor prevents us from using this case for all situations because sometimes V  ∉ lrcod(V  ).We say that the intersection is undetermined for the cases where we cannot determine if an edge intersects or not with another edge of a walk.In such cases, the boundary could be completed by using other -points.

Algorithm Overview.
To find the boundaries of a set of points  we propose Algorithms 1 and 2. In Algorithm 1 each sensor first obtains local information (line 1), then it applies the definition of Section 4.1 to recognize two consecutive -points (lines 4-6).If the -point and its corresponding adjacent points are not already used, then a boundary (or a hole) has been detected and the function RHWoC is called (line 7).Function alg:closed recovers the complete border until it finds an edge that already is on the boundary.When no more borders can be found then the list L is returned (line 12).
Correctness of Function RHWoC.Let W be the outer area reachable with the lrcod from vertices of .At each step, the next landmark V  in the walk is selected according to the RHWoC rule.The rule's precondition asserts that V 1 , . . ., V −1 are -convex hole points; then W does not contain any landmark.For the following steps, RHWoC rule ensures that As ⋃ ∀V  ∈   = W and the walk never crosses itself, the Jordan theorem asserts that  is a boundary and the set of landmarks  \  are in the same side of .Finally, based on our connectivity assumption, the walk reaches a previously detected edge and the cycle of lines 5-17 terminates correctly.

Simulations
The proposed algorithm has been implemented for randomly generated sets in a quadrangle of 30 × 30.The number of nodes and the value of  are user-defined parameters.Examples of networks for different values of  are illustrated in Figure 6.The proposed algorithm finds correctly the outer boundaries of networks which are relatively sparse (Figures 6(a  International Journal of Distributed Sensor Networks 7

Related Work
A well-known technique to find the boundary of a set of points is the -shape [12].Alpha shapes are closely related to alpha complexes, subcomplexes of the Delaunay triangulation of the point set.
Some approaches to detect boundaries in networks are (a) distribution of nodes in the nonhole regions [13], (b) length of the shortest path between two nodes to detect cycles [14,15], and (c) patterns that the nodes produce [1].
In robotics, landmarks are useful for navigation, place recognition, localization, and mapping.The proposed approach deals with a more challenging setting compared with [6], on which a robot that is only able to detect the cyclic angular order of landmarks in an unlimited range can accomplish simple tasks, such as navigation and patrolling.One of the advantages of this approach is that the memory of the robot does not save the complete state of the environment.To compensate, it considers an infinite range in the landmark order detector.

Conclusions
The problem we address in this paper is to find the boundaries of a sensor network by using a limited range-cyclic order detector.By using local information we show how to detect -points; these points are on the boundary or on a hole.The Right Hand Without Crossings (RHWoC) rule can be used to discover other landmarks from an incomplete border walk.We provide a correctness proof of the RHWoC rule.Some holes could not be detected by using local information.We also show the configurations where the boundary is detectable; the most remarkable case is when there are two consecutive -points.Therefore, the proposed technique is appropriate for large sensor networks.The experimental evaluation confirms the effectiveness to find the boundary of large sensor networks.

Figure 1 :
Figure 1: Sequence of landmarks detected by the sensor.lrcod(V 4 ) = [V 5 , V 3 , V 1 , V 6 ]; up to a cyclic permutation, landmark 2 cannot be detected because it is outside the reach of the sensor; analogously, lrcod(V 3 ) = [V 4 , V 5 , V 2 ].Only the cyclic order is preserved; the sensed angular position of each landmark may be quite different from the real one.

Figure 3 :
Figure 3: (a) Detectable 4-hole, the sensor V  reads an empty sector.(b) Nondetectable hole, all sensors on the hole read nonempty sectors.

Figure 4 :
Figure 4: Finding the boundary from a partial walk.The boundary is recovered from the walkV 1 V 2 V 4 V 6 ; point V 5 ∈ lrcod(V 6) is selected because  65 := (V 6 , V 5 ) does not intersect any previous edge.

Figure 5 :
Figure 5: Discovering intersections.Using sectors and landmark ordering, one can determine when two edges intersect at a single point.

Figure 6 :
Figure6: Boundaries obtained from a set of  uniform distributed random points within a quadrangle of 30 × 30.