We will now discuss the networks whose nodes are deployed in a single-line. This is often the case when narrow bridges are monitored.
3.4.3.1 One-hop direct-connectivity subcase
To present the proposed routing algorithm with network coding, we consider the single-line topology (Figure 3.2a). We assume that each node has transmission power adjusted to communicate only with its immediate (one-hop) neighbours. At this point for simplicity we also assume that perfect transmission schedule is in use, so that transmitted packets do not collide and messages can be properly received by their intended receiving nodes. While we present the scheme we assume that no losses happen due to the
61 poor conditions in the wireless channel either. We use an example with a six-node network as shown in Figure 3.3 to illustrate our routing scheme with network coding.
Fig. 3.3 Network coding based algorithm for the single-line layout. Each node can reach only its immediate neighbours.
Initially, each node performs sensing and creates one packet of sensing data. That packet needs to be transferred to the sink nodes at the both ends of a bridge. In this step each node broadcasts its original message. Thus, at this point each node will be aware of its own message and messages from its immediate neighbours. As shown at the top row of Figure 3.3, each node (with index in boldface) is associated with six rectangles. Each rectangle belonging to a node (say k) shows the index of the source node associated with the message that has been received by node k after each round of message exchanges. For example, after the first round of message exchanges, node 3 has received messages from itself (node 3) and its immediate neighbouring nodes 2 and 4, as indicated in the top row of rectangles in Figure 3.3. In the next step, each node XORs the two received messages just from its two immediate neighbours and broadcasts
62 the coded packet. For example, node 4 XORs messages from nodes 3 and 5, and broadcasts the coded message to nodes 3 and 5. Since node 3 knows its own message, performing an XOR operation on coded packet received from node 4 and the original message of node 3 will enable node 3 to decode the original message from node 5. Similarly, node 3 receives and decodes the original message from node 1 as well. As a result, the original messages that each node holds after two rounds of message exchanges are shown in the middle row of rectangles in Figure 3.3. For example, node 3 now holds the original messages of nodes 1, 2, 3, 4 and 5. In essence, after two rounds of message exchanges using network coding, each node possesses the original messages from two-hop neighbouring nodes. Therefore, each node excluding the sink nodes, behaves like a relay node for its immediate neighbours, as shown in the Figure 3.1a. Each node XORs a broadcasted message received from its two neighbours with a message it already has, in order to decode new messages. This process continues until the last round of broadcasting, when no node receives more than one coded (XORed) message. The rest of messages can simply be forwarded to the sinks via the nearby nodes. The number of transmissions can be reduced further, if we increase the transmission power.
3.4.3.2 Two-hop direct-connectivity subcase
Contrast to the case of one-hop direct-connectivity, after the initial phase only nodes that receive messages from two two-hop neighbours behave like relay nodes in the first round of network coding. In the first round, they XOR the messages received from the two-hop neighbours. After that, the algorithm continues in the same manner as it functioned for the one-hop connectivity case.
If the transmission power of a node increases, so that a message from each node can directly reach its second-hop neighbours we will talk about two-hop receiving (two-hop connectivity). In the case of two- hop receiving the number of total transmissions decreases further due to the overhearing capability. Initially, all nodes perform the sensing, based on which they create their own packets. These packets should be forwarded to sink nodes at the both ends of the linear structure (e.g. bridge). Thus, nodes will
63 broadcast their own messages (collected from their own sensing units) in the first stage of the algorithm. After this stage, all nodes will be aware of their own messages, and messages originating from their first- hop and the second-hop neighbours. In the Figure 3.4, this algorithm is presented for the case of a linear network that consists of nine sensor nodes that operate as relay and sensing units. As shown at the top row of the Figure 3.4 each node (with index in boldface) is associated with nine rectangles. Each rectangle belonging to a node (say k) shows the index of the source node associated with the message that has been received by node k after each round of message exchanges. For example, after the first round of message exchanges, node 5 has received messages from itself (node 5) and its two physically nearest neighbouring nodes from each side, namely from nodes 3, 4, 6 and 7 as indicated in the top row of rectangles in Figure 3.4. This concludes the first phase of the algorithm.
In the next phase, each node that received two messages, one from the second-hop neighbour from each side, XORs those two messages and broadcasts the coded packet. For example, node 5 XORs messages from nodes 3 and 7, and broadcasts the coded message to the nodes 3, 4, 6 and 7. Since the nodes 3 and 4 know the message (3), performing an XOR operation on the coded packet from the node 5 and the original message of nodes 3 will enable nodes 3 and 4 to decode the original message from the node 7. Similarly, nodes 6 and 7 receive and decode the original message from node 3 as well. As a result, the original messages that each node holds after two rounds of messages exchange are shown in the middle row of rectangles in Figure 3.4. For example, node 3 now holds the original messages of nodes 1, 2, 3, 4, 5, 6 and 7. In essence, after two rounds of message exchanges using network coding, each node possesses the original messages from one-hop, two-hop, three-hop and four-hop neighbouring nodes. As shown above, each node excluding the sink nodes, behaves like a relay node for its two-hop neighbours, Figure 3.1a. Each node XORs message received with a corresponding message that it already has, as a mean to decode new messages. This process continues until the last round of broadcasting when no node receives more than one coded (XORed) message from its two-hop neighbours. This concludes the second round of the algorithm. The rest of messages can simply be forwarded to sinks via the nearby nodes.
64
Fig. 3.4. Network coding based algorithm for single-line layout. Each node can reach directly its second-hop neighbours.
3.4.3.3 Three-hop direct-connectivity subcase
The number of transmissions can be reduced further with the increase of the transmission power. Three- hop receiving subcase operates in a similar manner. There will be even more of overhearing. First and third phase of the algorithm will be the same as in the case of one-hop and two-hop direct-connectivity schemes, and all messages will be overheard by one-hop, two-hop and three-hop distant neighbours. The only change is that in the second phase, nodes qualify for transmission only if they have received two different messages from their three-hop neighbours in the previous stage, Figure 3.5.
65
Fig. 3.5. Network coding based algorithm for single-line layout. Each node can reach directly its third-hop neighbours.
For instance, in the network coding phase (starts at the second row of rectangles) a node with the ID 4, received a message from nodes 1 and 7 and it will encode them and broadcast the coded message. In the next instance (the third row of rectangles), a node with the ID 7 did not receive two different messages from its three-hop neighbours so it will not participate in the network coding any more. We may notice that the number of necessary transmissions decreases significantly due to the overhearing.
66