In this section, the EVA routing protocol is described in detail. EVA consists of three phases, namely, data collection, void detection, and data forwarding. This section is structured as follows. First, the routing table and packets used in EVA have been defined. Second, the void detection phase is described in detail. Third, void detection is discussed in detail. Last, the data forwarding phase is explained in detail.
3.4.1. EVA: Tables and Packets Format
In this section, the Routing Table (RT) and packets have been explained in detail. The RT is the main element of the suggested protocol. Each sensor should gather and store some information for its neighbors within a one-hop range. Each sensor can gather the information through the received hello packet during the data collection phase and void detection phase. As shown in
Figure 4a, the RT generally contains six fields including
ID, depth value, residual energy, distance (calculated by the triangle metric), route cost (calculated by the triangle metric and residual energy), and Boolean flag (isVoid). The value of this flag has been changed based on the void status of the node (i.e., 0 for void nodes and 1 for ordinary nodes).
The EVA routing protocol is containing three types of packets:
hello, probe and data packets. Hello packets are utilized regularly in the data collection phase to exchange information between neighbors. As demonstrated in
Figure 4b, The hello packet is comprised of three fields:
ID (for the sender), depth value, and residual energy. ID is employed to verify the sender of the hello packet. Additionally, the depth value is utilized to distinguish the depth level of the sender. The information of the hello packet is extracted in saved in the RT if the sensor received the hello packet from shallower neighbors. Moreover, the residual energy is stored in RT and employed route cost calculation. On the other hand, the void probe packet is presented in the EVA routing protocol to find the void nodes as shown in
Figure 4c. This type is containing two fields, namely
ID (for the sender) and Boolean
isVoid. The first field is the ID of the void node (i.e., actual, and intuitive void node). The probe packet is created by the actual void nodes and transmitted to its one-hop neighbors. If the ID of the receiver node equals the ID of the probe packet in its RT, it changes the isVoid fields in its RT. Then it changes the ID of the probe packet and forwards it if the node discovers itself as an intuitive void node. Otherwise, it discards the probe packet.
Figure 4d illustrates the data packet format employed in the suggested protocol. The data packet involves two major elements: packet header and data. The packet header is consisting of four fields, namely
Sender ID, packet sequence number, forwarder ID, and source ID. Sender ID is the distinctive ID of the sender node. Packet sequence number the assigned number to the data packets in the source node. Forwarder ID is the ID for the best candidate. Source ID is the ID of the source node that creates the data packets. The last two fields are employed to detect and count the successful data packet dropped or received in the whole network.
3.4.3. Void Detection Phase
This phase is aimed at detecting the actual and initiative void nodes by designing and developing a void detection algorithm.
Table 1 shows the notations that used in the void discovery algorithm. In Algorithm 1, each sensor considers itself an actual void node if did not find any sensor in its routing table. The node (i.e.,
) create a void probe packet containing two fields, called Sender ID and isViod Boolean flag equal to 1 (i.e., True). Then, it inserts its ID and isVoid in the packet and broadcast it to its one-hop neighbor sensors.
Secondly, neighbors that receive the probe packet (i.e.,) extracts and check the ID and match it with its routing table. If did not find it in the routing table, it drops the packet. Else, it changes the value of isVoid in its routing table to 1. The receiver node then checks whether it is an intuitive void node. It examines two scenarios: first, if all data in the routing table is void nodes, node become an intuitive void. Second, the node (i.e.,) check the number of void and ordinary nodes in its routing table. If the void nodes numbers are higher than the ordinary nodes, it checks its routing table if has one ordinary node with a “very good link”. If founds, node become an intuitive void node. It then updates the isVoid value in the packet equal to 1 and updates the ID and rebroadcasts it to its one-hop neighbors. Otherwise, it immediately drops the void probe packet. This method is repeated all sensors updated the isVoid field in the whole network.
The following are the reasons for defining both scenarios as intuitive void nodes. In the first scenario, a node whose neighbors are all void nodes causes the data packet to be dropped since all its neighbors are void nodes, which causes the data packet to be dropped. In the second scenario, a node with a high number of void nodes in its routing table has a higher probability of losing a data packet as most of its neighboring are inside the critical area, causing the data packet to end up at a void node in later hops. As a result, if this node does not have at least one ordinary neighbor with excellent link quality, it is considered unreliable. This causes the data packet to reach the critical area, increasing the chances of losing the data packet, as well as increasing the power consumption of the ordinary neighbors due to the continued employment of these sensors, and causing the ordinary nodes to die early. Furthermore, if this node has at least one ordinary neighbor with very good link quality, it is recognized as an ordinary node since the use of this node could minimize the likelihood of packet loss and causes the data packet to be routed outside from the critical areas’ boundary.
Algorithm 1: EVA: Void Detection Algorithm. |
1. | procedure . () |
2. | if then |
3. | if then |
4. | Generate () |
5. | |
6. | |
7. | |
8. | end if |
9. | end if |
10. | end procedure |
11. | procedure () |
12. | if ( then |
13. | return |
14. | else |
15. | |
16. | |
17. | end if |
18. | |
19. | |
20. | for to do |
21. | if () then |
22. | |
23. | Else |
24. | |
25. | end if |
26. | end for |
27. | if () then |
28. | |
29. | |
30. | |
31. | else if () then |
32. | Let |
33. | Let |
34. | for to do |
35. | if () & () then |
36. | |
37. | end if |
38. | end for |
39. | if () then |
40. | |
41. | . |
42. | Broadcast |
43. | end if |
44. | else |
45. | free () |
46. | end if |
47. | end procedure |
Figure 5 explains the void detection phase of Algorithm 1 in detail. As clearly shown in
Figure 5a, node
is an actual void node because the RT is empty. Thus, it generates a void probe packet embedded with its ID and isVoid equal to 1 and broadcast it to its one-hop neighbors. Node
and
obtains this packet because node
existed in RT of node
and
. Next, both sensors update its isVoid status in the RT for node
equal to 1. Consequently, node
and
. become an intuitive void node as all its neighbors in RT are void nodes. Therefore, these nodes embedded their ID and update the isVoid field in the probe packet and rebroadcast it to its one-hop neighbors.
In
Figure 5b, node
,
, and
collects the packet from node
. Node
simply drops the packet because it is not available in its RT. Node
and
accept the packet as a node
are clearly inside the RT of the node
and
. Therefore, it changes the value of isVoid in the RT of node
equal to 1. Here, the number of void nodes is equal to the number of the ordinary nodes and there is at least one node with high link quality (i.e., node
in the RT of node
and node
in the RT of node
), node
and
become an ordinary node. Therefore, they simply discard the packet. On the other hand, node
,
, and
gets the packet from node
. Node
simply drop the packet because node
is not in the RT of
. Additionally, node
and
extract the packet because node
is inside the RT of node
and
. Thus, node
and
change the status of isVoid equal to 1 for node
in their RT. Here, all neighbors in the RT of the node
are void nodes, node
become an intuitive void node. Node
then change the ID of the void probe packet and the status of is isVoid equal to 1 and rebroadcast it to its one-hop neighbors. Moreover, node
is an intuitive void node because it does not have an ordinary node with high link quality. Therefore, node
change the ID and the isVoid in the probe packet and rebroadcast it. This method is repeated continuously until all sensors become aware of its void status whether void or ordinary nodes.
3.4.4. Data Forwarding Phase
In this phase, the data forwarding algorithm is designed to select the non-void nodes in the process of forwarding the data packet. Here, the data forwarding method in SPRE-PBR is modified to suppress the void nodes in joining the forwarding process. The OSPA algorithm proposed in SPRE-PBR is enhanced to select the best candidate from the ordinary nodes with ignoring both cases of void nodes mentioned previously. All sensors have enough information collected from both phases one and two. This information has been utilized to select the efficient void aware candidate sensor among neighbors. In this phase, once a sensor has data to send it to calculate the route cost based on the triangle metric for all neighbors and store it in the routing table. Then, the best candidate has been selected based on the non-void sensors with high link quality.
Table 2 shows the notations that are used in the efficient void aware data forwarding algorithms.
Algorithm 2 illustrates how the modified algorithm named Efficient Void Aware Data Forwarding (EVA-DF) algorithm chooses the best efficient candidate among neighbors. This algorithm consists of one procedure and one method. Firstly, line 13–41 (EVA-DF) is designed to select the set of candidate neighbors from the ordinary nodes in the highest layer. Secondly, line 1–12 Procedure is designed to distinguish the number of best candidates set among neighbors in the RT based on the efficient non-void sensors. The rest of the methods have been briefly described in SPRE-PBR. As a result, the EVA-DF is normally called by the data forwarding algorithm to select the efficient void aware sensor nodes that have a direct impact on increasing the packet delivery ratio.
Algorithm 2: EVA: Efficient Void Aware Data Forwarding. |
1: | procedure () |
2: | | |
3: | | while |
4: | | | |
5: | | | if () and () then |
6: | | | | |
7: | | | | |
8: | | | end if |
9: | | | |
10: | | end while |
11: | end procedure |
12: | |
13: | methodEVA-DF () |
14: | | Sort based on in ascending order |
15: | | Let |
16: | | Let |
17: | | for to do |
18: | | | if () then |
19: | | | | |
20: | | | end if |
21: | | end for |
22: | | if () then |
23: | | | |
24: | | else |
25: | | | if then |
26: | | | | |
27: | | | end if |
28: | | end if |
29: | | Clear () |
30: | | Let |
31: | | if then |
32: | | | () |
33: | | end if |
34: | | if then |
35: | | | () |
36: | | end if |
37: | | if then |
38: | | | () |
39: | | end if |
40: | | return |
41: | end method |