• 沒有找到結果。

Emergency Guiding Protocol

An Emergency Guiding and Monitoring System by ZigBee WSNs

6.3 Emergency Guiding and Monitoring Schemes

6.3.1 Emergency Guiding Protocol

Our design emphasizes on the correctness in discovering escape paths even if passing haz-ardous areas is inevitable. When emergencies happen, sensors will update their altitudes in response to these events. Sensors near the emergency locations will raise their altitudes to form hazardous regions. Our protocol will avoid guiding users passing the hazardous regions, if possible. After hazardous regions are formed, some sensors may have local minimum alti-tudes. The partial link reversal concept in [54] will be used to solve this problem. Navigation is done by simply following a sequence of sensors with decreasing altitudes. Below, we first introduce some notations.

• D: a constant such that any sensor whose distance to any emergency location is less than or equal to this value is considered within a hazardous region. In this paper, we use hop count to calculate the distance.

• Aemg: a large constant to be assigned to a sensor that detects an emergency event.

• Ai: the altitude of sensor i.

• Ii: the altitude of sensor i obtained in the initialization phase.

• ei,j: the hop count from an emergency sensor i to a sensor j.

• EMG packet: the emergency notification packet, which has five fields: (1) event se-quence number, (2) ID of the sensor which finds the emergency event, (3) sender’s ID, (4) altitude of the sender, and (5) hop count from the sender to the emergency sensor.

Let’s assume that a sensor x detects an emergency. It will set its altitude to Aemg and immediately broadcast an EMG(seq, x, x, Aemg, 0) packet. The packet will be flooded in Gg. The following rules summarize the actions to be taken when a sensor y in Ggreceives from a sensor w an EMG(seq, x, w, Aw, h) packet originated from x.

1. y judges if this is a new emergency by checking the tuple (seq, x).

(a) If this is a new emergency event to y, y records this event and sets ex,yto h+ 1.

(b) Otherwise, y checks if h+ 1 < ex,y. If so, y changes ex,y to h+ 1.

Then y records w’s altitude (Aw) in its neighbor table. Moreover, if w = x and x is an exit sensor, y should clear the flag is exit in the entry for x in its neighbor table to avoid guiding users into this emergency location.

2. If ex,ywas changed in step 1 and ex,y≤ D, y considers itself within the hazardous region formed by sensor x. Then y re-calculates its altitude as follows:

Ay = max{Ay, Aemg× 1

e2x,y + Iy}. (6.1)

In our design, the altitude of a sensor inside a hazardous region is increased by an amount inversely proportionate to the square of its distance to the emergency location.

The value Iy is included because we intend to reflect y’s distance to its nearest exit. The max function is to take into account that y may be located within multiple hazardous

regions and thus may receive multiple EMG packets from different sources. In this case, the new altitude of y should reflect its distance to the nearest emergency location.

3. Sensor y has to check if it has a local minimum altitude, unless y is an exit sensor. If y is a local minimum (i.e., its altitude is less than all its neighbors’), it adjusts its altitude as follows:

Ay = ST A(ANy) × 1

|Ny| + min{ANy} + δ, (6.2) where Ny is the set of all neighbors of y, ST A(ANy) is the standard deviation of the altitudes of sensors in Ny, and δ is a small constant. The basic idea of using standard deviation is for quick response to emergency situations. When altitudes of sensors in Ny vary significantly, it is likely that y is near a hazardous region. Then it should increase its altitude more quickly to avoid becoming a local minimum again. The fixed constant δ is to guarantee convergency. Its value should be carefully chosen because a large δ may easily guide sensors to cross hazardous regions. On the other hand, a small δ may cost too many message exchanges although it may help find safer paths. The reciprocal of|Ny| is to reflect the number of possible choices that a sensor has to select escape directions. A sensor that has less neighbors will increase its altitude in a faster manner to get away from its local minimum situation. These designs will speed up the convergency time of our algorithm. Also note that each sensor has to keep on going back to this step to check if it becomes a local minimum again.

4. Finally, y broadcasts an EMG(seq, x, y, Ay, ex,y) packet if any of the following condi-tions is true:

(a) This is a new emergency packet heard by y.

(b) Sensor y has changed Ay or ex,yin the previous steps.

We remark that the above step 3 adopts the concept of partial reversal to adjust local minimum nodes’ altitudes. We do not adopt the full reversal approach in our design because

it may easily guide users in a non-hazardous region to pass through a hazardous region even unnecessarily. Using partial reversal can help guide users to route around a hazardous region.

This will be justified by our simulation.

Finally, we discuss how a sensor chooses its escape direction when emergencies happen.

When a user is inside a hazardous region and there is an exit sensor nearby, we may guide users either to this exit or to other exits in non-hazardous regions. In our work, we choose a hybrid approach. Sensors inside hazardous regions can choose an exit sensor that is also in hazardous regions if the former is within one-hop from the latter. However, sensors in non-hazardous regions will never choose an exit inside non-hazardous regions unless it is surrounded by hazardous regions or there are not proper exits in safe areas. If this case, sensors will keep on increasing their altitudes until reaching a level higher than those of sensors in hazardous regions. We summarize the escape rules for any sensor y as follows:

1. If y is in hazardous regions and it sees an exit sensor which is in Ny and which is also in hazardous regions, then y chooses this exit sensor.

2. In all other cases, y directs users to its neighboring sensor which has the lowest altitude.

We claim that as long as there exists at least one exit sensor which is not located in an emergency location, the protocol can find an escape path for each non-exit sensor in a finite number of steps. To prove this, observe that disregarding exit sensors, a sensor has no escape path only if it is a local minimum. Since δ is a non-zero constant, the protocol has a progress property in the sense that the number of sensors which have no escape paths will reduce. So this protocol will converge.

Finally, we comment on the value of Aemg, which will affect the navigation results. A value that is too small may result in altitudes at the boundaries of hazardous regions that are smaller than some sensors’ initial altitudes. To avoid this problem, assuming that the maximum altitude in initial phase is M AXini, the value of Aemgshould be at least larger than M AXini×(D+1)2.

(a) (b)

(c) (d)

A A

B B C

D C

D

C A B

E A

B C

D

Figure 6.3: Some navigation examples of our algorithm.

Some Navigation Examples

In the following, we show some typical navigation scenarios in our scheme. Fig. 6.3(a) rep-resents the scenario where hazardous regions do not form a closed region. After forming hazardous regions, sensors A, B, and C may temporarily become a local minimum. However, suppose that sensor D already found an escape path. Later on, A, B and C will eventually find their escape paths via D. In Fig. 6.3(b), sensors A, B, and C are surrounded by a hazardous region. In this scenario, these three sensors should raise their altitudes to a level higher than the altitude of at least one sensor in the hazardous region. Assume that sensor D has the small-est altitude in the hazardous region. With a proper δ, our algorithm will likely to guide users via D in most cases. Fig. 6.3(c) is similar to the previous case except that sensors A, B and C are all inside the hazardous region. So the escape paths for these sensors would be similar.

In Fig. 6.3(d), there is an exit sensor in the hazardous region. Sensors A, B, C, and D, which are direct neighbors of the exit sensor, will guide users to that exit. Sensors that are not direct neighbors of the exit will guide users to leave the hazardous region via shortest paths first, and then to other exits outside the hazardous region, unless there are no such exits.

Fig. 6.4 shows how altitudes change in a 7×7 grid network with D=2. Three emergency events occur in coordinates (S2,4), (S6,7), and (S5,2), in that order. An exit is located in (S1, 7). Changes of altitudes are shown in both side views and top views. Altitudes are expressed

Figure 6.4: Examples of altitude changes when three emergency events occur in coordinates (S2, 4), (S6, 7), and (S5, 2).

in dB. Navigation paths are from sensors with higher altitudes to sensors with lower altitudes.