the network 95% of the time so that the dedicated data is quickly delivered. In this case CT = 95% and if CF < CT it means that the sink node does not keep a good connection with the network, so the PRP needs to be used by the peripheral neighbours of D to send the data packets. Otherwise, if CF > CT a MANET routing protocol will be used such as LAR.
It is explained further how D’s next neighbour ID is calculated.
5.2 D’s next neighbour ID estimation
Once D0s neighbour establishes that PRP needs to be used, based on the CF value,
D’s direction of movement and time that D travels disconnected until it will re-join
the WSN (TD) needs to be calculated. Based on these values S will know which is
D’s next neighbour ID (through which node D will re-join the WSN). S will send
packets to D’s next neighbour buffer only for TD seconds to avoid the situation in which D will not re-join the WSN through the estimated neighbour or it will not re-join the WSN at all. Although their location is known, D’s current neighbour needs to determine the D’s next neighbour node ID. Also, because of the location errors, TD will be an estimated value.
D can have restrictions when it comes to power, hardware or communication time
and because of this two scenarios are possible when D needs to send hello packets after it breaks the communication with its neighbour:
1. No constraints for D. In this case D will start to send hello packets to rejoin the WSN as soon as it breaks its communication with its neighbour. 2. D has constraints. D needs to start and send hello packets to rejoin the
WSN when it reaches its next neighbour communication area. For this case
For both scenarios, because D can change its direction of movement at any time and because the location error can influence the value obtained for TD, these values are estimated values.
D’s direction of movement needs first to be calculated to estimate D’s next neigh-
bour ID. It is assumed that a periphery node i (Ni) knows if its position is at the network periphery (as it was shown in Section 5.1). P represents the set of peripheral nodes of the network: P = {PN SPSSPESPW}, where PN, PS, PE and PW are the set of peripheral nodes from the north, south, east and west side of the network.
PN = [N30, N28, N26] for the scenario presented in Figure 5.2. Let Xi be the connec- tivity indicator between a peripheral node i (Ni) and D, where Xi = 1 if Ni is con- nected with D and Xi = 0 if it is not connected. A peripheral connectivity vector can be defined as P CV = [Xi], iP , and P CV = {P CVN SP CVSSP CVE SP CVW}, where P CVN, P CVS, P CVE and P CVW are the north, south, east and west con- nectivity vectors. If P CVb
N, P CVSb, P CVEb and P CVWb are the binary values for
P CVN, P CVS, P CVE and P CVW, we can define P CVNd, P CVSd, P CVEd and P CVWd as the values for P CVb
N, P CVSb, P CVEb and P CVWb in decimal. In the scenario pre- sented in Figure 5.2, at time t1, D is connected with node 30 so P CVN,t1 = [001],
P CVN,tb 1 = 001 and P CVN,td 1 = 1. If at t2 D is connected with node 28 and
P CVN,t2 = [010], P CV
b
N,t2 = 010 and P CV
d
N,t2 = 2 so it can be said that D moved
from the right to the left because P CVd
N,t2≥ P CV
d
N,t1.
A neighbour of D, at a certain moment in time ti, can decide if D is moving left or right by comparing P CVd
ti with P CV
d
ti−1. Let Dm be the direction of movement
indicator where: Dm =
0, mobile node moves to lef t, if P CVtdi > P CVtdi−1
1, mobile node moves to right, if P CVtdi < DP CVtdi−1
5.2 D’s next neighbour ID estimation
If D switches the direction of movement frequently, knowing Dm is not sufficient for
D’s neighbours to inform S where to send the data (to either the peripheral node’s
neighbour on their left or on their right). Because of this we use D’s probability of switching direction of movement at tβ, noted Pαtβ:
Pαtβ = αtβ − 1 sum(Mxtβ) − 1 ; (5.5) Mxtβ = β X i=1 P CVti; (5.6)
where Mxtβ represents the sum of the connectivity vectors generated at different periods of time ti, i = 1, β; αtβ = max(Mxtβ) represents the element with the
highest value and sum(Mxtβ) represents the sum of all vector elements.If Pαtβ <
Pαr, where Pαr is a threshold value imposed by the application requirements, it
means that D moves following the direction of movement estimated by Dm. A short example of how the probability of switching the direction of movement based on the scenario presented in Figure 5.2 is explained further. If it is assumed that at
t1 D (node 36) is connected with node 30, then the north peripheral connectivity vector at t1 is P CVN,t1 = [0, 0, 1] and Mxt1 = [001]. If, at t2, D moves from
right to left and joins the WSN through node 28, then P CVN,t2 = [0, 1, 0] and
Mx,t2 = [001] + [010] = [011]. At t3, D joins the WSN area through node 26, then
P CVN,t3 = [1, 0, 0], and Mxt2 = [001] + [010] + [100] = [111]. At t4, D moves from
left to right and enters the connectivity area of node 28, so P CVn,t4 = [0, 1, 0], and
Mx,t4 = [111] + [010] = [121]. So, during its movement from t1 to t4, D moved
from the connectivity areas of node 30 to node 28, then 26 and back to node 28. It moved 3 times and changed the movement direction once. So based on Eq. 5.5,
P αt4 = 100 ∗
2−1
4−1 = 33. It can be concluded that D has a probability of switching direction of 33%. The calculated probability is compared with a threshold value and based on the result, D’s neighbour can estimate if D will re-join the WSN through its right or left peripheral neighbour.
Once D’s direction of movement is known, D’s neighbour can estimate through which node D will rejoin the WSN: through its peripheral neighbour from the left or from the right. It was previously explained that when D leaves the WSN area, its neighbour will inform S to send the data packets to the next neighbour of D.
S will start sending packets to it until D will rejoin the WSN and it will start to
receive packets from its neighbour buffer. In order to rejoin the WSN, D sends hello packets during the time it is disconnected. Sending hello packets will result in an additional energy consumption. If D does not have any energy constrains, then the hello packets can be sent as soon as D leaves the WSN until it will find its next neighbour. However, if D has energy constrains, sending hello packets only when it approaches its next neighbour communication range is crucial for saving power. For this, D will receive from its neighbour the time after it will need to send hello packets noted TD.
In the next section it is explained how TD is calculated.