A New wireless sensor networks Routing Algorithm Based on SPIN Protocols and Circumference Technique

In Wireless Sensor Networks (WSNs), the data transmission might be specified as a major challenge. Various protocols of routing were suggested for saving energy throughout the transmission of data in WSNs. The protocols of routing which are on the basis of data centric method were adequate in such regard which are performing data’s in-network aggregations for yielding energy-saving data disseminations, such sensor nodes have a few of limitations because of their limited, computing power, storage capacity, and limited energy. The data have been routed between nodes with the use of various routing protocols. In addition, there are a few routing protocols for WSNs, all such protocols attempted on eliminating a few of such limitations. A Circumference-based SPIN protocol, (C-SPIN), is going to implement for eliminating the limited energy as well as data overlap with the use of right-most data movement method. ______________________________________________________________________________________________

Because of the extreme energy constraints related to a lot of densely deployed sensor nodes, it is requiring set of network protocols for implementing different management and network control functions like network security, localization, and synchronization. The conventional protocols of routing have many limitations when utilized to the WSN, that were majorly because of such network's energy-constrained nature. For instance, flooding can be defined as an approach where a certain node is broadcasting the data as well as controlling the packets which it received to the rest of network's nodes. The process will keep repeating till reaching the destination node. It must be indicated that such approach doesn't consider the energy constraints which are provided via WSN. Therefore, in the case when utilized for the routing of data in WSN, it results in certain issues like overlap and implosion approach, also the duplicated packets might be circulating in the network, and thus the sensors are going to receive such duplicated packets, resulting in an implosion problem. In addition, in the case when 2 sensors are sensing the same region as well as broadcasting their sensed data at the same time, in such case, duplicated packets will be received via their neighbors. For overcoming the flooding's drawbacks, another approach referred to as gossiping might be utilized [3]. With regard to gossiping, after a packet is received, the sensor might be randomly selecting a neighbor and sending the packet to such neighbor, while the same process will keep repeating till all the sensors receive such packet. The use of gossiping led to that a certain sensor might be receiving just single copy related to the sent packet. Whereas gossiping is tackling the problem of implosion, there has been a considerable delay for packet in reaching all network's sensors. Also, such drawbacks are showed in the case when there is an increase in the number of network nodes. A lot of researches were conducted for exploring and overcoming the limitations of WSN and solving the application and design issue. A lot of routing protocols for WSN were investigated and compared in this work [3].

WIRELESS SENSOR NETWORKS (WSNs):
A few hundreds or thousands of bones are what constitute the WSNs, each one of the nodes will be connected to single (or often many) sensors, each one of the nodes will generally have many parts: microcontroller, source of energy, typically a battery or embedded form related to the harvesting of energy, electric circuit to interface with sensors as well as a radio transceiver with internal antenna or connection to external antenna. Sensor nodes might have different sizes from dust's grain to a shoebox, even though the functioning "motes" related to the genuine microscopic dimensions are yet to be formed. In addition, the sensor nodes' costs are similarly variable in range of some hundreds of dollars, on the basis of the complexity related to individual sensor nodes. The costs and size constraints on the sensor nodes might lead to corresponding constraints on the resources including communication bandwidth, memory, energy, and computational. Also, the WSN topology might be varying from between simple star networks to advanced multi-hop wireless mesh networks. Furthermore, the propagation approach between network hops might be flooding or routing [4].

Challenges of WSN
Despite the various applications, the sensor networks are a lot of distinctive technical challenges because of the next aspects: a. Ad hoc deployment: The majority of sensor nodes were applied in regions without infrastructure. A common approach of deploying them in a forest might be using airplane to toss them. In this case, the nodes will be identifying its distribution and connectivity. b. Unattended operation: In the majority of cases, as soon as applied, no human interaction will be made the sensor networks. Therefore, the nodes will be accountable for re-configuration when changes are made. c. Untethered: Sensor nodes aren't connected to any of the energy sources. The is just finite energy source, that should be utilized for communication and processing. It must be indicated that the communication dominates the processing in energy consumptions. Therefore, for the purpose of making optimum use of the energy, the communication should be decreased. d. Dynamic changes: There is a requirement that the sensor network systems might adapt to changes in connectivity (for example, failure of nodes, adding more nodes, and so on) in addition to changing the environmental stimuli. Therefore, dissimilar to conventional networks, in which the aims are to maximize the throughput of channel or minimize the node's deployment, the main consideration in sensor networks is extending the robustness and life time of the system [4,5].

Conventional Protocols [6-7]
a. Classic Flooding: in this protocol data is sent data to all neighbors, this protocol suffers from implosion, when data is sent to all neighboring nodes, some nodes receive two copies of the data (which causes waste of bandwidth), and data overlap, if there are two sensing devices cover overlapping area and each sensor is sent to all its neighboring nodes, therefore, each node receives two copies (which causes reduction in data delivering accuracy) as in figure (2.a). b. Gossiping: in this protocol data is forwarded to a one random neighbor, this will avoids implosion but disseminates information at a slower rate as in figure (2.b).

Sensor Protocols for Information via Negotiation (SPIN)
A study conducted by Heinzelman et.al. suggested a family related to the adaptive protocols which is referred to as the Sensor Protocols for Information via Negotiation (SPIN) which is disseminating all information at each one of the nodes to each nodes in a network indicating that all network's nodes were possible base-stations (as can be seen in the Fig-3), this allow the users to query any of the nodes and immediately getting the needed information, such protocols are using the fact that the nodes which are in close proximity have comparable data, and thus there is a requirement for just distributing the data which is not possessed via the other nodes. In addition, the SPIN protocol's family use the data negotiation as well as resource adaptive algorithms, while there are 3 messages DATA, REQ, and ADV were utilized in SPIN. ADV packets is broadcasted via a node to all other nodes which has some data, such advertising node ADV message involves attributes regarding the data it has. Also, the nodes have interests in the data, that the advertising node has required through sending REQ, to advertising node. The advertising node will send the data to the node after receiving REQ, such procedure will continue in the case when the data reception grantee ADV message as well as send it [8]. Developed for point-to-point communications related to the threshold-based resource-awareness approach for completing data negotiation as shown in the Fig (5), the node will be engaging in the protocol operations just if it is concluding that it might be completing all the stages related to protocol operations without resulting a decrease in energy level below the threshold [7][8]. The nodes are sharing single channel with regard to communications. As can be seen in Fig (6), in the case when a node is sending out the data packet on broadcast channel, the packet will be received via all other nodes in specific range of sending node. In addition, the nodes that received (ADV) doesn't immediately respond with (REQ). In the case when the node hears (REQ) that is issued via other node that want to receive the data, it will cancel its request. Furthermore, the advertising node will be sending the data message just one time, even in the case of receiving multiple requests for the same message [9]. Extending the abilities of SPIN-BC for enhancing its reliability as well as overcoming the message transmission errors resulting from lossy channel (Fig -7). B-Enhanced reliability will be reached via periodic broadcasting regarding REQ and ADV messages. C-In the case when a node request certain data doesn't receive the data which is requested in specific time period, it will be sending the request again. D-Enhanced reliability through periodically re-advertising the metadata. Following sending out the data message, a node will wait for specific period of time prior to responding to other requests for the same data message [10].

THE PROPOSED ALGORITHM
Basically, as shown in figure (8), the proposed technique (C-SPIN) will depend on some of the previously mentioned SPIN routing protocol (PP and EC). The work steps of the algorithm are: 1. The suggested sensor network will contain K-nodes, distributed randomly with a specific node which is responsible for delivering the information directly to an external base-station (BS).

Figure 8: Wireless Sensor Network Architecture
2. When any node (i.e. K 1 ) senses a pre-defined ambient conditions the following steps will take place (figure-9): a. (K 1 ) creates a table to calculate distance between its position and the first node of both right-most and left-most neighboring (i.e. K 2 and K 9 ). b. (K 1 ) calculate distance between its position and the second node of both right-most and left-most neighboring (i.e. K 3 and K 12 ). c. If distance between (K 1 ) and (K 3 ) is greater than the distance between (K 1 ) and (K 2 ) then (K 1 ) will ignore (K 2 ) and continue calculating distance between its position and the next node of the right-most neighboring (K 4 , K 5 , ……, K n ). d. If distance between (K 1 ) and (K 12 ) is greater than the distance between (K 1 ) and (K 9 ) then (K 1 ) will ignore (K 9 ) and continue calculating distance between its position and the next node of the left-most neighboring (K 14 , K 20 , ……, K n ). e. Steps (b), (c) and (d) will go on until the distance between (K 1 ) and (K n ) is less than the distance between (K 1 ) and (K n-1 ) at any side (right or left) which means that (K n-1 ) is the furthest node from the source (K 1 ), then the information will be transmitted from (K 1 ) to (K n-1 ) through shortcut path of nodes using (SPIN-PP) protocol. f. During these steps (a, b, c, d and e), (K 1 ) will use (SPIN-EC) protocol to check if its energy is under a pre-defined threshold then (K 1 ) will hand on the table of distance to the first node of the right-most neighboring (K 2 ) which will continue these procedure until it ends.

IMPLEMENTATION AND RESULTS
For the purpose of evaluating the efficiency of the proposed algorithm, performance analysis of both traditional SPIN-PP and SPIN=EC was compared with the proposed technique by calculating the speed in second (s) of each technique. Four different sensor networks were creates of 55, 61, 65 and 70 nodes for the evaluation process with a specific start and destination nodes.
As in table (1), the following results were obtained: