A new algorithm and routing protocol based on convolutional codes using TCNet : Trellis Coded Network

Currently emerging technologies have taken advantage of the possibility of communication with the World Wide Web to expand to all applications of this technology, among them the Internet of Things – IoT. This work proposes the implementation of new packets forwarding algorithms using the concept of convolutional codes. The results obtained by means of extensive simulations show gains in terms of latency and energy consumption reduction compared to the AODV protocol. The implementation complexity is extremely low and compatible with the few hardware resources usually available in the elements of a wireless sensor network (WSN). This research uses Finite State Machine (FSM) to get the networks nodes, obtained from settings with Mealy machine – (MM) due to the low complexity of (“XOR” gates and "shift registers"), eliminating the use of any routing tables by means of Trellis decoding. The route can be chosen based on criteria of Quality of Service (Qos) – aware routing protocols.


Introduction
Wireless sensor networks (WSNs) have evolved from the idea that small wireless sensors can be used to collect information from the physical environment in a large number of situations.Early work in WSNs were developed by Defense Advanced Research Projects Agency (DARPA), so called Smart Dust, based on microelectromechanical systems (MEMS), devices able to detect light, temperature, vibration, magnetism or chemicals, with embedded processing and capable of transmitting wireless data.Currently emerging technologies have taken advantage of the possibility of communication with the World Wide Web to expand to all applications of this technology, among them the Internet of Things -IoT.
Although they were developed several hardware devices by the research community on WSN, there is an effort led by Internet Engineering Task Force (IETF) represented by the Working Group: Routing Over Low-Power and Lossy Networks (ROLL) [1], responsible for standardization and specifying the IP protocol, proposed several criteria to satisfy specific routing requirements.The world of WSNs is no exception: the use of an open standard such as IP is crucial and is necessary to build a scalable architecture for the next Internet and other IP networks [2].This work proposes the implementation of new packets forwarding algorithms using the concept of convolutional codes.The results obtained by means of extensive simulations show gains in terms of latency and energy consumption reduction compared to the AODV protocol.The implementation complexity is extremely low and compatible with the few hardware resources usually available in the elements of a wireless sensor network (WSN).

Related work
The constant searches to obtain protocols that support the WSNs networks are challenging due to the dynamic characteristics of these networks [3].The attempts to adapt the routing protocols of the infrastructure networks [4], [5], [6] to the cases of ad hoc networks are often inconsistent to satisfy the such aspects: frequent changes in topologies, poor links, restricted bandwidth, and restrictions on power sources.
Several criteria in protocol specification have been studied by the ROLL Working Group and a specific protocol called attention in this research, because it is one of the most used protocols in WSNs: Ad-hoc On Demand Vector Routing (AODV) [7].As conclusion, the Working Group defined the following set of requirements for emerging protocols to meet WSNs needs: scalability; routing metrics; network stability; degree of constraints and application aware routing as challenging, because of the high degree of network constraints.
The MPLS concept are also required for providing service to the network (IP) layer, could be a good option to implement QoS, in which routing algorithms are not scalable.Although the MPLS employs label tables that are added to datagrams.These tables are used by intermediate nodes to identify and switch the packets.However, this procedure is not compatible with the resources available in WSN nodes.

Proposal and contribution
This work proposes a new algorithm and routing protocol based on convolutional codes to enable QoS-aware protocols in WSNs using the concept of a "Trellis Coded Network"-(TCNet) [8], [9], [10] and [11] that will be used in determining the routing datagrams in environment of WSNs with limited resources, resulting the following advantages: • Elimination extensive routing tables; • Reduced latency by eliminating signaling packets: the route request (RREQ) and route reply (RReply) employed, for example, in AODV; • Implicit self-recovery mechanism in case of failure; • Making it inherent in energy savings.

Fundamentals of the TCNet model
The situation shown in this section represents a typical problem encountered in applications in WSNs.

Example of scenario found in WSNs
The Fig. 1 shows a scenario of a WSN in which the sink node acts as Access Point to IP infra-structured networks, allowing information to be obtained from the other sensors in the network.
In this multicast scenario, the message has to be forwarded by several intermediate nodes before arriving at the desired destination.In the conventional protocols, the intermediate nodes have stored route tables, where the hop to be executed are planned to be carried out.In the TCNet scenario the sink node sends a query-qi in a specific order defined by a QoS criterion, and each node of the network performs the following procedures: • verifies if it is the called node; • if it concludes that it is a route node, it updates the payload in the frame with the sensed value and rebroadcasts the message.The configuration of the frame structure consists of the fields (WSN header -TCNet label -Payload data) as follows: • The WSN header (a code word is loaded as the metric to be used by the routing algorithm); • The TCNet label (a sequence defined by a QoS criterion is loaded, allowing each node to recognize its position in the route); • The payload (the field that stores the updated data sensed by the sensor).The process is concluded when all nodes of interest have been visited.
A new algorithm and routing protocol based on convolutional codes using TCNet: Trellis Coded Network 3

Analogy with convolutional codes
Considering that one of the possible ways of representing and analyzing a network is through a modeling as a digraph D = (V, E) where: • V is the set of vertices vi, representing the network's nodes or equipments; • E is the set of edges (vi, vj), representing the physical or logical connections between the vertices vi and vj.Convolutional Codes use concept of finite automata or Finite State Machines (FSM) [12] defined by a "cross" function (kn/outn) as shown in Fig. 2. It is also assumed that a transition occurs at the FSM from state i to state j.In TCNet each state represents a network node and the transition state indicates that the frame information must be sent from node i to node j.
Based on this analogy, this work applied the same concepts of convolutional codes in the solution of WSNs network structures due to the similarity of graph topology and the transition of states to behave as a transmission of data packets.

Decoding Protocol using relationships: State Diagram, Tree Diagram and Trellis Diagram
Thus, as explained in more detail in [8], [9], [11], the tree diagram can be used to describe the evolution of the states, in this work, will be considered as nodes on the tree.As a result, it is possible to trace a path on the tree determined by the input sequence kn(t) in the MM, as shown in Fig. 4-b where the symbol (1) of the sequence kn(t ) specifies a lower branch of a bifurcation in the tree, while symbol (0) specifies the upper branch.Considering that the tree diagram structure is not the best representation for routing analysis, the simplifications obtained due to the elimination of tree diagram redundancies make the trellis diagram one of the tools used to analyze the configurations generated by the finite state machines [13], [14].As in the state diagram and the tree diagram, the same components can be identified in the trellis diagram, such as: states, branches and routes, as described below, according to Fig. 4-c  In this new proposal for the decoding of routes in a network, by the similarity of the analysis of branches on a trellis diagram as a function of a received data sequence, this work uses the properties of the algorithm of Viterbi [14].
The principle of the Viterbi algorithm consists of decoding a received sequence, estimating the shortest Hamming distance, in the case of hard decision, between a sequence of symbols received and the weight of the branch or metric in the section considered in the trellis, configuring a decision case by maximum likelihood, explained in further detail in Section 3.
The Fig. 5 shows an example of a decision on a trellis branch, where the state-10 decides the origin of the sent sequence to establish a surviving branch.Using the concepts of the Viterbi algorithm, the state in question analyzes the adjacent branches, calculating the Hamming distance between the received sequence and the respective weights of the (metric) branches, deciding for the branch that has the shortest Hamming distance.This example shows a simple decision with no ambiguity.In other cases where ambiguities exist require the introduction of logical distance based on the Lattice theory [15].

Typical application scenario of the TCNet algorithm
The application of the TCNet algorithm for decision making on the trellis, can be seen in a typical broadcast scenario where the network nodes are initially in the same coverage area and one node may be receiving a signal from all others.Fig. 6 (c) shows a simple situation, where each node receives information only from two other nodes.As an example, the node 10 receives a request with the information (c1, c2) = (11) starting a query to the trellis decoder resident at the node, Fig. 6 (b), and being informed with the following reception possibilities: node (00) can generate the code (c1, c2) = (11) and node (01) can generate the code (c1, c2) = (00).
The operations performed by the nodes in the same coverage area of the node (sink-00), are shown in Fig. 6  (c).The operation performed by node 10 consists of obtaining dHam between the code word carried in the header of the FRAME, Fig. 6 (a) and the information of the code word registered in the branch of the trellis resulting in: • branch as origin node (00) ⇒ dHam = 0; • branch as origin node (01) ⇒ dHam = 2.
The meaning of the value dHam = 0 indicates that the FRAME received by the node (10) originated from the node (sink-00), thus starting other operations by node (10), resulting from the request received: refresh the payload and determine the next code word (c1, c2) = (01) using the {kn} sequence received in the FRAME label, to be updated in the FRAME header.The other nodes located in the same coverage area perform the same procedure of node (10), not having the result of dHam = 0.In this case, the nodes in the same coverage area remain waiting for a new request.
However, this is a simple example where ambiguity is absent from the decision-making process, only served to validate the concept proposed in this paper.In [11] there are shown other cases that demonstrate the robustness of the process.

Simulation and experimental results
This work uses as simulation environment the OMNeT++ based on C ++ and object oriented.Currently it has been widely used in research for being open software with applications in simulations and modeling of traffic networks, used as reference for comparisons among other techniques due to available frameworks.

TCNet algorithm simulation scenario
The tests were initially done with an 8 nodes network scenario, considering an ideal case without nodes failure, where the SINK node sends a query with a CBR traffic to verify the reachability of the nodes.Fig. 7-a shows the node model used, configured by a Mealy Machine (MM) with k/n=1/2 and the respective trellis decoder shown in Fig. 7-b.The theoretical result of the route to the chosen scenario, it can be observed in Fig. 7-c, where the resulting route defined on a trellis represent the route from SINK, passing through all the nodes of the network and returning to SINK itself after completing a query.

Latency of the TCNet algorithm during a query
Although the processing times of the FRAMES (tpn) executed by the MM are different, due to the positions in the displacements of the input sequence in the MM, all nodes in the network will be busy executing the same sequence received during Multicast, so collisions will be avoided.Even so, guard bands (tg) were considered to guard against possible collisions due to channel delays.
To obtain network latency during a query, the following data were normalized: • Processing time (tpn), considered during the displacement in the MM; • Channel Delay (tc), propagation time in the wireless communications channel considered; • Guard band (tg), time interval considered by the nodes between the Multicasts of the FRAMES.
Considering a theoretical scenario, with random distribution of the nodes in a coverage area with the maximum radius distance (dmax =1000 m), Eq. ( 1) was used to define the total latency of the network representing the contributions of the nodes to the considered network: Initially, values were plotted showing the cumulative sum of latency individually from the nodes, organized in the same sequence as the route: ΣTL0 (node 0), ΣTL4 (node 4), ΣTL2 (node 2), ΣTL5 (node 5), ΣTL6 (node 6), ΣTL7 (node 7), ΣTL3 (node 3) and ΣTL1 (node 1).

4.3.Energy consumed by the TCNet algorithm during a query
The energy consumed in a WSN is a fundamental parameter due to the limitations of the sources that are most often non-replaceable.
This work considered the energy consumed by the nodes in the use of the TCNet algorithm, taking into account the power distribution in the following situations: The energy consumed by the node can be obtained by Eq. (2) which will be considered as the contribution of the node to the total consumption of the network.

Performance of the TCNet algorithm in relation to the AODV algorithm
It will be considered an initial scenario of a network with 8 nodes and the same criteria for specific nodes (Source and Destination).In this work will be considered only the latency and energy consumption in a scenario defined: fixed; nodes randomly positioned in (area of 1000 m x 1000 m); the SINK that initializes the communication with the other nodes through queries in the network (TCNet); the host (0) is the source node and attempts to communicate with the other nodes of the network using alternate routes through successive floodings (AODV).Fig. 8-a compares the latency of the AODV and TCNet scenarios during the query to node 4, belonging to an 8-node network randomly distributed in areas with the same propagation coverage.It is noted that AODV latency is 75% higher than TCNet latency due to the simplicity of TCNet in performing 1 query.Fig. 8-b compares the TCNet queries for the other nodes of the network with the AODV route-setting mechanism for the same nodes: 4, 6, 7, and 1: in TCNet the latency increases as the nodes correspond to the last positions of the sequence kn (t), resulting in longer MM processing time during decision making of the target node and in TCNet the latency increases as the nodes correspond to the last positions of the sequence kn (t), resulting in longer MM processing time during decision making of the target node.In cases of scenarios where the network nodes density increases, they are shown in [11], which compares latencies for the most difficult access nodes.

Conclusion and future works
The main objective of this work is the proposal of a new algorithm and packet forwarding protocol which is specific for networks with limited processing, 10 2017 | Volume 3 | Issue 12 | e3

Figure 1 .
Figure 1.Scenario of a sink node querying a set of sensor nodes in a WSN and the frame structure used by the TCNet model.

Figure 2 .
Figure 2. Network nodes using as model the states of a Finite State Machine -FSM

Figure 4 .
Figure 4. (a) MM -generator with the input sequence kn(t) and output word code outn(t) = (c1, c2); (b) Tree diagram based on the MM -generator and detail of the path in the "full line" onthe tree, associated to the input sequence kn (t) in the generating MM; (c) Trellis diagram.

Figure 5 .
Figure 5. Example of hard decision used by state ( n -10) to decide on a trellis branch, based on received sequence {11}.

Figure 6 .
Figure 6.(a) TCNet FRAME initialization by the sink node; (b)Trellis decoder; (c) Nodes in the same coverage area.

Figure 8 .
Figure 8.(a) Comparison of 1 TCNet query and AODV signaling mechanism to establish a route to node 4; (b) Scenario of comparing TCNet queries for an 8-node network with respect to AODV.In the comparison of energy consumption: TCNet x AODV, it was considered an 8-node network and a route going through all nodes to reach the most distant node; node 7. The results are shown in Figures 9 (a) and (b).

Figure 9 .
Figure 9. (a) Energy distributed among TCNet nodes in relation to the energy consumed by the AODV; (b) Comparison between the total energy consumed by the mechanisms of TCNet x AODV.

Table 2 .
Contribution individually of the energy ΣE (n)consumed by the nodes of the TCNet network