• 沒有找到結果。

If G is connected, the tree T constructed by algorithm DAT is a connected deviation-avoidance tree rooted at the sink

Related Works

Theorem 2. If G is connected, the tree T constructed by algorithm DAT is a connected deviation-avoidance tree rooted at the sink

A

Figure 3.4: Snapshots of an execution of DAT.

Proof. First, we show that T is connected. Each sensor is the root of a singleton subtree in the beginning and we will prove that only one senor will be the root in the ending. Since G is connected, when a sensor x 6= sink is the root of a subtree (i.e., x = root(x)), it always can find a neighboring sensor y such that distG(x, sink) = distG(y, sink) + 1. It is clear that root(y) 6= x, because distG(root(y), sink) ≤ distG(y, sink). Hence, edge (x, y) can be included into T , and x will not be the root anymore. By repeating such arguments, T must be connected and rooted at the sink. Second, we show that T is a deviation-avoidance tree. This can be derived from two observations. First, when an edge (u, v) is included into T , DAT will choose v as the child of u if distG(v, sink) is larger than distG(u, sink), and vice versa. Therefore, if the path from the sink to sensor u is one of the shortest paths, the path from the sink to sensor v is also one of the shortest paths. Second, assuming distG(v, sink) = distG(u, sink) + 1, DAT will include (v, u) only when v itself is the root of a subtree. This guarantees that all descendant nodes in Subtree(v) will not deviate from their shortest paths to the sink. Hence, the theorem follows.

3.2.2 Algorithm Z-DAT (Zone-based Deviation-Avoidance Tree)

The Z-DAT is derived based on the following locality concept. Assume that u is v’s parent in T . According to Eq. 3.2, for any edge (x, y) ∈ EG such that x ∈ Subtree(v) and y /∈ Subtree(v), arrival/departure events between x and y will cause a message to be transmitted on (p(v), v), thus increasing the value of P

(x,y)∈EG∧x∈Subtree(v)∧y /∈Subtree(v)wG(x, y). Therefore, the perimeter that bounds the sensing area of sensors in each Subtree(v) will impact the update cost U (T ).

A longer perimeter would imply more events crossing the boundary. For example, in the three subtrees in Fig. 3.5, although all subtrees have the same number of sensors, the perimeter of the subtree in Fig. 3.5(a) is smaller than that in 3.5(b), which is in turn less than that in 3.5(c). In geometry, it is clear that a circle has the shortest perimeter to cover the same area as compared with other shapes. Circle-like shapes, however, are difficult to be used in an iterative tree construction. As a result, Z-DAT will be developed based on square-like zones.

(a) (b)

v

v

(c)

v

p(v)

p(v)

p(v)

Figure 3.5: Possible structures of subtrees with nine sensors.

Z-DAT is derived based on the deviation-avoidance principle and the above locality concept. The algorithm builds T in an iterative manner based on two parameters, α and δ, where α is a power of 2 and δ is a positive integer. To begin with, Z-DAT first uses (α − 1) horizontal lines to divide the sensing field into α strips. For each horizontal line between two strips, we are allowed to further move it up and down within a distance no more than δ units. This gives 2δ + 1 possible locations of each horizontal line. For each location of the horizontal line, we can

calculate the total event rate that objects may move across the line. Then we pick the line with the lowest total event rate as its final location. After all horizontal lines are determined, we then further partition the sensing field into α2regions by using (α − 1) vertical lines. Following the adjustment as above, each vertical line is also allowed to move left and right within a distance no more than δ units and the one with the lowest total event rate is selected as its final location.

After the above steps are completed, the sensing field is divided into α2 square-like zones. First, we run DAT on the sensors in each zone. This will result in one or multiple subtrees in each zone. Next, we will merge subtrees in the above α2 zones recursively as follows. First, we combine these zones together into α2 × α2 larger zones, such that each larger zone contains 2 × 2 neighboring zones. Then we merge subtrees in these 2 × 2 zones by sorting all inter-zone edges (i.e., edges connecting these 2×2 zones) according to their event rates into a list L and feeding L to steps 3 ∼ 11 of the original DAT algorithm. Second, we further combine the above larger zones together into α4 × α4 even larger zones, such that each even larger zone contains 2 × 2 neighboring larger zones. This process is repeated until one single tree is obtained. The algorithm is summarized in Algorithm 2. An illustrated example is shown in Fig. 3.6. In the first iteration, we divide the field into α×α zones and adjust their boundaries according to δ as shown in Fig. 3.6(a).

In the second iteration, each 2 × 2 neighboring zones is combined into a larger zone as shown in Fig. 3.6(b).

Algorithm 2 Z-DAT(G, α, δ)

1: Divide the network into α × α zones based on parameters α and δ.

2: Run DAT on the sensors in each zone.

3: i ← 1

4: while 2αi 6= 0 do

5: The network is divided into 2αi ×2αi zones.

6: Run DAT on each zone to merge its subtrees.

7: i ← i + 1

8: end while

To summarize, Z-DAT is similar to DAT except that it examines links of EG

Zone12 Zone11

Zone10 Zone9

Zone8

Zone5 Zone6

Zone2 Zone1

Zone15 Zone14

Zone7

Zone3 Zone4

Zone13 Zone16

2 (a)

Zone2

Zone4 Zone3

Zone1

(b)

Figure 3.6: An example of the Z-DAT algorithm with α = 4.

in a different order. By partitioning the sensing field into zones, each subtree in T is likely to cover a square-like region, thus avoiding the problem pointed out in Fig. 3.5. Also, by using the parameter δ to fine-tune the lowest-level zones, Z-DAT tends to avoid high-weight links becoming inter-zone edges. In fact, this is a consequence of the the highest-weight-first design principle.

Theorem 3. If G is connected, the tree T constructed by algorithm Z-DAT is a