A Step towards the Efficiency of Collisions in the Wireless Sensor Networks

Wireless Sensor Networks (WSNs) have an ideal tactic for implementing the number of applications due to evading complex wirings connections and their maintenance. On the other hand, the main source of data communication in other networks is protocols. The Medium Access control Protocol defines when a wireless sensor (WS) transmits its recognizer data. However, MAC protocols suffer from collisions that ultimately affect the performance of WSNs. Consequently, care must be taken for improving the efficiency of medium access protocol. This paper presents a model of the Lightweight medium access protocol (LMAC) protocol, which is energy efficient protocol suitable to analyze the probability of collisions for SN (Sensor Nodes) when the data is transmitted at the same time. This paper we consider connected topologies that consist of 5 nodes. For analysis, we have used UMC PRO 0.2 (UPPAAL Model Checker Probabilistic) and results show that the chances of collisions decreases if the weight of nodes before they transmit data is increased. After that, we also compare the results of five nodes with their time slot 5, 6, and 7 depend on the chances of the collisions and suggest an optimistic choice of efficiency and also decrease the cost of networks a network set-up that improves the performance and reduces the cost of the network.


Introduction
Like different technologies, enhancements in wireless sensor networks were truly encouraged by military applications and manufacturing companies (such as for instance, tracking enemies, robot control, vehicle tracking and so on) [1,2,3,4].Nowadays, wireless sensor networks are utilized as a part of an others fields like human services checking, water quality observing, air contamination observing, thus many other fields [5,6,7].
In simple words, WSNs is an arrangement of the small number of sensor nodes that can sense data from their surrounds and exchanges it among them by wireless connections [8,9,10].From these sensor nodes, one node are must be a base node i-e Gateway Node [11,12,13].Every node has the capability to process and transmit that data to the destination node [14,15,16].These sensor nodes are usually small, consume less energy and process a limited quantity of data [17,18,19].Since sensor nodes are reckoned useless at the depletion of the battery; therefore, they can certainly be disconnected from the network connection that may degrade the performance (efficiency) of a network [20,21].
It has been observed that, unlike other networks, it is commonly hard to change or replace batteries in WSNs.The main object of wireless sensor networks is to achieve a maximum lifetime of networks.Due to the shared medium of the network channel, any node can receive the packet of any transmitting node or vice versa.Since packets can also be messed up via inferences of another node any time.The medium access control protocol is vital to efficiently control the sending and receiving of packets among nodes.Its solutions have forced on energy consumption, as some main problems of energy wastes are found at MAC layer; Overhead, collisions, hidden terminal problems, Idlelistening, and plenty of more [22].
A number of research papers have suggested many techniques to reduce those problems.From which Lightweight Medium Access Control (a version of MAC protocol) is also a protocol that may reduce the problems of collisions efficiently [23].It is lightweight because it is energy-efficient, reduces collisions, and is a schedule based protocol.
When it comes to the analysis of the behaviour of any system, model checking has been found as the best practice for examining the wireless networks [24].It satisfies the properties of a system based on finite states of the model.For differing purposes like as personal computers (PC's) and wireless communication preceding to costly simulations, it has developed a huge prerequisite, in turn, to debrief the consistency and efficiency of systems in over-all especially in WSNs [25].So there is need of a model for energy efficient protocol, which we proposed the lightweight medium access protocol based on the energy efficiency for analyzing the probability of collision in sensor nodes during the data transmission.
This paper is based model of the Lightweight medium access protocol (LMAC) protocol and is divided into 6 sections.Section two is based on related work; section three provides details of the Lightweight medium access protocol (LMAC) protocol.Section four is based on the probabilisticmodel checker.Section 5 provides verification of model and finally, in section 6 we conclude our work.

Related Work
Protocols (both wired and wireless) are distributed algorithms, which make communication possible among multiple users (machines or nodes).However, these algorithms are quite complex to understand and to implement.Therefore, care must be taken to design and implement these protocols in order to make the best use of them.The issue of designing and implementing protocols for wireless sensor networks becomes even more important because sensor nodes may change their position and suffer from collisions [26].Collisions are brought about by nodes transmitting information in the meantime through a transmission medium.Subsequently, endeavours are taken at the MAC (Medium Access Control) layer to lessen or limit collisions [27].A characteristic example is the LMAC (Lightweight Medium Access Control) protocol, which is modeled and analyzed in using timed automata modelchecker UPPAAL [23,28,29].Moreover, in [30], Hoesel et al. present exploratory aftereffects of various TDMA-based [22].MAC conventions utilizing the discrete occasion test system OMNeT++ [32], The author additionally thinks about the test consequences of SMAC, EMAC and LMAC conventions for wireless sensor systems [28,30,31].The work found in [30] especially the examination of various hanging tight occasions for nodes before the choice of a schedule opening in which they transmit information.The author utilizes a simulation approach (OMNeT++) to assess the impacts of various holding up times [30].The reproduction comprises of one portal hub and 99 different nodes.Be that as it may, the work presented in this paper trusts that recreation can manage a lot higher quantities of nodes than the modelchecking; yet then again, demonstrate checking crosses every single imaginable situation which are scarcely ever the case with re-enactment.For instance, executions that lead to crashes are all in all a little subset of the full arrangement of executions.
This paper extends the work presented in [28] by investigating the probability of collisions for nodes which may transmit data at the same time.The technique used (to reduce the probability of collisions) is to introduce different waiting times for nodes before they transmit data.Based on verification results the paper proposes an optimal network set-up policy that reduces collisions and improves network efficiency.

Lightweight Medium Access Control Protocol (LMAC)
This makes sure that MAC protocol is necessary for a prolonged network of wireless sensors, and competent to avoid energy waste problem just like Idle Listening problem, Hidden-Exposed problem, or conflict of frames problem.
The LMAC protocol has been proposed specially for WSNs and it is depending on the scheduling mechanism, using TDMA-scheme.It divides time frames to equal time slots given in Figure 1.

Figure 1. Structure of a Frame
Every node can be occupied one time -slot.The LMAC protocol is design to work in the following manner [28].
• Multi-hop: LMAC protocol is a multi-hop regarding forward a packet to the next-hop, when it received by a SN, which helps in eradicating the delay for setting up the paths.• Energy-efficient: The advantage of scheduling mechanism medium access control protocols is that nodes are not ever utilizing their power consuming transceivers although not required.Hence, such type of MAC has a virtuous view of being energy-efficient.Poonam K.K, Asif Ali Laghari and Rashid Ali Laghari • Self-configuring: This LMAC protocol is a selfconfigure as far as regarding time slot assignment, and uses time division multiple access schemes, wherever every node is assigned to a time-slot.Therefore, the node can easily connect free from conflicts after the network has turned into steady.Hence, the communication is scheduled in order to void effects of energy-wastage problems, such as Idle Listening problem, Hidden-Exposed problem, or conflict of frames problem.Each node has assigned a fixed interval in which it is permitted to control the wireless medium according to its own prerequisites and necessities.
In this paper, we implement LMAC protocol with probabilistic "Wait-Phase", which allows WS to select a fixed interval for transmission, or reception, that does not make any cause for collisions or conflicts with other transmissions or reception.This protocol is a multi-hop, energy efficient, and self-configure.

Unoccupied Time-slot selection algorithm
At this point when, a node needs to gather transmitted bit vectors, although its own local bit vector modern.A complete frame has conceded, the node can recognize unoccupied time-slot by applying "OR logical operation" to all retrieved bit vectors where "1" bit at final result implies a node selecting that time-slot will affect with different occupied time-slot and a "0" in the result suggests that the availability (unoccupied slots) can be occupied [30].Here, consider the Greynode joins the network and this node receives CM (control message) from the nodes 3, 4, 5 and 6.Since every node consists of 8 bit-vectors and grey node performs the OR Logic operation on these vectors and gets result 01111101.In the resulting bit vector, there is logically zeros at the position of 1 and 7 and will arrange and securely utilize vacancy of free slot 1 or 7 without interfering different transmissions.

Lightweight medium access control -Working
The LMAC protocol works in following four phases [33]; a) Initial Phase: In this phase, a newly joined node is unsynchronized firstly, after that tries to find other neighboring nodes.It synchronizes, once it receives a neighboring node and updates its recent slot no to the slot no of the sender.Then it moves to the wait phase.b) Wait Phase: In this phase, the possibility for a node that can hold up a maximum of three frames based upon a load of execution given to every transition.Then it proceeds to the next phase.c) Discover Phase: In this phase, the node accumulates the information of 1 st order neighboring node throughout one complete frame.By collecting this information, the node can find time-slots that are unoccupied in its 2 nd order neighbor node.The node then randomly selects an unoccupied time-slot and then move to the next phase.

d) Active phase:
In this last stage, a node transmits a message in its own slot.Then, it hears to other time-slots and gets information from other neighbor nodes.The node additionally keeps its view on the network update.At the point when a neighbor node informs about a conflict in the time-slot of the node at that point proceeds with continues to the wait phase.Since conflicts in nodes can happen when at least two than nodes select a similar time-slot for transmission at the same time.This can occur with little chances at network setup given in Figure 3.

LMAC -Lightweight and Energy efficient
At the point when a node gets a packet during the time-slots of other's time-slots and it switches its transceiver in to less energy devour mode so as to standby the energy when a node selects that is unnecessary use for communication throughout the recent time-slot.Hence, LMAC protocol called as Lightweight protocol.
Since this LMAC, protocol performs as well as Energyefficient.For reducing the chances of collisions, LMAC protocol is more appropriate with scheduled based architecture.It does not suffer from collisions by increasing the number of nodes and provides greater benefit for other protocols like contention-based protocols in terms of reducing collisions in frames, Over-Hearing, and Idle Listening.Hence the consistent and energy-efficient data transmission is obligatory to extend the network's lifetime.

Probabilistic-Model Checker
The Model Checker is a great experiment for observing the Wireless Sensor Networks in the current stages of the system development.In this paper, we use an application (version) of Uppaal Model Checker i-e probabilistic model checker UPPAAL PRO 0.2 with the little concept of the timed automata for the analysis of proposed LMAC protocol.
We present the model of LMAC protocol that is divided into four phases with the help of Uppaal Pro 0.2 model checker.Initial Phase.The model of the initial phase is given in Figure 4. Firstly, the node is in the unsynchronized state when a node joins the new network, it does not receive any message and tries to find other nodes.
At the point when a node receive a message i-e listen (can_hear [id][aux_id] = = 1) and synchronize with the sender (sendWM?), it sends their recent slot_no to the slot_no of the sender (current = slot_no[aux_ id]) and resets its local clock at t= 0. The slot_no is also a part of the message that is sent.After that, it moves to the wait phase.

Figure 4. Initial Phase
Wait Phase.Since Node cannot wait, more than three frames when it enters in to wait for phase depending on the weight of execution assign to every transition.Actually, waiting is executed like "Self -loop" is given in Figure 5.After waiting at most OneFrame, TwoFrame three frames a node moves to the next phase.

Figure 5. Probabilistic Wait phase
Discover Phase.This phase consists of four locations.First, one is the entry location i-e Listening 0 model once the node is recognizing the medium.Second, one is Rec-one 0 model that a node keeps detecting afterward receiving of initial msg.The third is Done 0 location that achieved once a node found a conflict.At last, the model based on the Committed-Location, in which the node finds on the off chance that it is recognizing the medium for a whole packet.
Once it happened then continues to select an unoccupied slot and moves to the active phase; otherwise, it continues listening is given in Figure 6.Active Phase.This last phase is the main phase of the node which deals with the sending the messages.At the Locationf, when a recent slot of a node is equivalent to selected slot and has some 1st neighbor node in its reception series (current= = slot_no[id] && first[id]!= 0) at that point it moves to ready state.It creates a duplicate copy of its Id and Collision info into global buffers (aux_id) and (aux_slot) and msg sends at t= =1.
On the off chance, that recent slot_no is not equivalent to its chosen slot_no (current!= slot_no [id]), at that point, it will continue to Listening location and can either wait for the free time_slot before the end of slot or accept a CM form a neighboring node.At Rec_one0 location, either a node may acknowledge a CM from a neighboring node before the finish of the time-slot gossip a contention or holds up in this area until the finish of the time-slot.In the last case, the node checks if a collision has been accounted for and it is equivalent to its slot number (col==slot no [id]).On the off chance that it fulfills, at that point node invigorates all the nearby data and moves to the waiting stage.In the event that the condition isn't fulfilling, at that point the node will continue with the following next slot is given in Figure 7.It is an essential property, which is free from deadlocks that can be tested in Uppaal Model Checker by showing the following properties, see figure 4, Nodes can send and receive the information at that time when the node should be synchronized.

b) Liveness property:
This LMAC protocol will ultimately resolve all conflict.The first one is to show that whenever two (1st or 2nd order neighbors) nodes select the same slot_no, then they will ultimately select a new slot_no.Finally, a node may leave the active phase due to a 3rd node reporting about the collisions, that tested by the following property given in Figure 8,  They have selected a slot_no which differs from their 1st and 2nd order neighbour's slots, where all nodes are in the active state, see figure 4,

Optimistic Network Configuration
We make use of a network that consists comprising of 5 nodes and compare the results with 6, 7, and 8 time-slots.However, it is already shown in Figure 5; a node may hold up at most three frames before choosing an availability of time slot.The higher waiting rate for any of the given advances will execute than any of the lower holding up rate changes.The advances with equivalent waiting rate are chosen for execution unevenly.

Table 1. Comparing probability of collisions with different time slots
Table 1 show network model which is consists of 5 nodes with 5 time-slots is certainly not an optimal decision and furthermore concluded that there is a little distinction on the probability of conflicts for the network model with 6 and 7 time-slots.In the end, it has confirmed that a model found with one more time-slot than the number of nodes are an optimum decision for better performance and decreased the cost.

Conclusion
We implement a network model consists of 5 nodes for our verification.Each node has a one-gateway node that is the initialization of the network.When the numbers of nodes are more than the number of time-slots, obviously, the nodes will collide.Our main purpose is to take the chances of conflicts for nodes at different waiting times before assigning a time_slot.We also verify number of properties with the purpose of increasing the certainty in the rightness of the reduced model.It has perceived that, if the time_slots is more prominent than the nodes then only little bit chances of conflicts will occur.In case of more number of slots than the number of nodes, that raises the cost of the network.Thusly, for superior performance and appropriate network's cost, we propose an optimal number of slots (one more slot than the number of nodes) to the number of nodes for specified network set-up.

Figure 2 .Figure 2 ,
Figure 2. unoccupied slot-selection algorithm [30] Figure 2, shows the simple free slot selection operation.Here, consider the Greynode joins the network and this node receives CM (control message) from the nodes 3, 4, 5 and 6.Since every node consists of 8 bit-vectors and grey node performs the OR Logic operation on these vectors and gets result 01111101.In the resulting bit vector, there is logically zeros at the position of 1 and 7 and will arrange and securely utilize vacancy of free slot 1 or 7 without interfering different transmissions.

Figure 8 .
Figure 8. Verify properties A Step towards the Efficiency of Collisions in the Wireless Sensor Networks EAI Endorsed Transactions on Scalable Information Systems 07 2019 -10 2019 | Volume 6 | Issue 23 | e2