Energy Efficient Cross-Layer MAC Protocol for Wireless Sensor Networks

Technological Advances in microelectronic and telecommunication fields enable the existence of tiny computing units, very small and more efficient. In the context of these new technologies, Wireless Sensor Networks (WSN) have emerged. The main research objective in WSN domain is the development of algorithms and protocols ensuring minimal energy consumption. Most proposed solutions are based on one-layer stack model approach. Recently, other works tend to exploit together many layers in order to optimize energy consumption. In this paper, we propose a Cross-Layer Medium Access Control (CLMAC) protocol using two adjacent layers (MAC and Network) to economize energy for WSN. The basic idea behind our protocol is to wake-up only nodes belonging to a routing path from the source to the base station (Sink) by exploiting routing information while other nodes leave maintained as long time as possible in a sleep mode. The protocol is modeled using a time Petri net and validated by TiNA tool. The simulation results demonstrate the effectiveness of our proposal in terms of energy consumption and latency.

In a dense WSN, there will be very high data traffic resulting in high energy wastage if there is one to one communication between the sensing node and gateway node with increased collisions. All these factors lead to clustering. So before applying a sleep/wake-up scheduling, all the nodes must be clustered for an energy efficient routing. So a simple distance based hierarchical clustering is proposed. This works in the network layer. For every cluster the scheduling protocol should work locally. A Load and Energy Consumption based Scheduling Algorithm (LECSA) has also been proposed and it works efficiently in the MAC layer. In this work, the implementation of LECSA is explained and compared with some of the equally good algorithms quantitatively. Most of the current research works are being carried out in the area of Internet of Things (IoT).
Using this technology, all our day today activities can be made automatically manageable from remote places. Sensors play a major role in this domain. Particularly for remote monitoring of these sensors and the popular drone applications, very less energy consuming protocol and median technologies should be used. So the research subject of energy efficient protocol for WSN explained in this paper definitely will be a promising domain for most of the future research works.

2-Related Works
In the preliminary work of Wendi Rabiner Heinzelman et al., [2] the most popular LEACH protocol (Low Energy Adaptive Clustering Hierarchy) was explained and it was a new blooming domain for the energy conservation in WSN. That is taken as backbone for the research work explained here. In the work of Al-Jemeli, Marwan, and Hussain, F. in [3], a cross-layer network operational model has been introduced for improving the energy efficiency. It integrates the functions of four layers, namely network layer, transport layer, MAC layer and physical layer. The location information about the nodes is used in the routing after discovering the shortest route. It is then used by the MAC layer for adjusting the transmission range of the nodes. The model proposed here minimizes the neighbor discovery process only to the current active routes. This leads to a reduction in the number of control packets transfer at the same time maintains the network packet delivery ratio. A roughly 10% reduction is said to be reduced by using the simulation of this model when compared with the conventional IEEE 802.15.4 based network.
In a survey paper [4] some of the cooperative diversityenabled Medium Access Control (MAC) protocols for Wireless LANs and Wireless Sensor Networks (WSNs) are discussed. Cooperative diversity is a newly emerged technique to reduce fading and to improve reliability in a wireless environment. In these types of protocols, neighbour nodes act as virtual multiple-input-multipleoutput (VMIMO) systems, where they cooperate with the transmitter-receiver pair of the network to send several copies of every packet to the receiver side through independent fading channels. These multiple copies of the same packet are combined at the receiver to reconstruct the original packet. This technique greatly improves reliability by using spatial diversity in the wireless channel. Wireless Sensor Networks (WSNs) are nowadays used in many important applications such as intrusion detection, target tracking, industrial automation, smart building and so on [5]. In this work, evolution of WSN MAC layer protocols is surveyed and compared in four categories namely asynchronous, synchronous, frame-slotted, and multichannel. Energy-efficiency is the challenging feature of all Wireless Sensor Network (WSN) applications [6]. Many WSN MAC (Medium Access Control) protocols use dutycycling schemes, where the nodes need to switch a node's radio between active and sleep modes. However, a node needs to know in advance whether its neighbour node is active or not. Asynchronous duty-cycling schemes are always advantageous over synchronous ones to eliminate the need of clock synchronization. Many Asynchronous protocols are compared with respect to their latency in this works. The importance of time synchronization for data consistency and coordination is discussed in detail in [7]. This protocol achieves better performance. Error rate is also greatly reduced here. It has achieved an accuracy of 0.3 microseconds in a multi-hop flat network while using five-times lesser energy than that of FTSP in simulation. It also works better in a clustered network. Whenever wireless technologies are needed in industrial applications Wireless Sensor Networks (WSNs) are the best possible solutions. But for successful usage, any WSN should provide energy efficiency, scalability, reliability, and timeliness. Few IEEE 802.15.4 WSNs are surveyed and has been found out that there are unreliability issues. This reliability problem arises when measures are taken for enabling good power management. This finally leads to less packet delivery ratio. This problem also arises when there is less number of nodes in the network. In [8], a number of such scenarios are analysed both in simulation and real time and concluded that the reliability issue arises because of the usage of contention-based Medium Access Control (MAC) protocol with their default parameter values. So they have concluded that if appropriate values are given instead of default values for the MAC parameters, then 100% delivery ratio can be achieved. But flexible values for MAC parameters cannot be formally assigned according to the standard. In this work [9], the energy efficiency and reliability issues of WSN are discussed in detail. They have proposed a new cross-layer framework which satisfies both the energy efficiency and reliability required for the application. This framework finds out the reliability requirements and configures the MAC layer based on the deployment of nodes and traffic at that instant. This new distributed and low complexity algorithm called Adaptive Access Parameters Tuning (ADAPT) makes the WSN to meet the reliability requirements of the concerned application. This is said to be successful for both single hop and multi hop IEEE 802.15.4 networks. The newly emerged Vehicular Sensor Networks (VSNs) branch of WSN has promising future in the current scenario [10]. In this work they proposed a new vehicular clustering scheme in VSN for energy efficient routing. It is compared with the existing algorithms like Direct, LEACH and DCHS. Shanti, Chilukuri, and AnirudhaSahoo have proposed an integrated MAC and routing protocol called Delay Guaranteed Routing and MAC (DGRAM) [11] for WSN applications where delay is not desirable. This TDMAbased protocol provide delay guarantee with energy efficiency. It uses the slot reuse mechanism. At the same time the medium should be contention free. The sending and receiving nodes" slots are computed in such a way that apart from sending and receiving time they can sleep to reduce the energy consumption. Hence a separate routing protocol is not needed. Simulation results of this DGRAM are also provided. And it is compared with the results of FlexiTP. It has shown a less delay when compared with the FLexiTP without compromising the energy efficiency. Several low-cost embedded devices are now available which can communicate with each other and different wireless devices [12]. Such multifunctional low end devices include RFID. A number of such RFID enabled devices come along with small sized cameras. These devices are deployed in harsh places. These nodes form an adhoc WSN. For several days or even months they should monitor for the desirable factors in such environment without power back-up and maintenance. In this work K.W.Chin has proposed a TDMA based protocol called PairWise for large scale WSNs. It does not follow global synchronization. Instead each node synchronizes only with its neighbours by establishing a pair of channels. Since the channels can hop in time using seed and maximum rendezvous period (MRP), the collisions are greatly reduced. The simulation results of this protocol are compared with that of S-MAC and another TDMA MAC protocol. Choi et al., in their work [13] discussed briefly about the listen and sleep mode switching of nodes in WSNs. Although this mode switching helps in the reduction of power consumption, it increases the delay. If a packet is ready to be sent from a node and at that time, according to the sleep cycle, if the node goes to sleep, than that packet has to wait for a long time. So in this work, the authors proposed a new routing protocol called Average Velocity based Routing (AVR) protocol which takes into account the node location as well as the packet waiting time. Each node calculates the n-hop average velocity of each of its neighbour nodes and then decides to which node, it has to forward the data packet. If the knowledge range n increases then automatically the delay decreases. Reference [14] describes about the low -power duty cycle MAC protocols in their work and about the trade off between energy efficiency and latency in such protocols. To reduce the latency problem they have proposed an Express MAC protocol (EX-MAC). It uses a short preamble scheme for sleep/wake-up scheduling to reduce the delay. Using a cross-layer API, it provides convergecast packets for performance optimization. Using simulation, they have proven that EX-MAC provides adjustable wake-up time reservation for convergecast traffic and thereby reduces the delay time. WSN for detecting unusual events use multimodality sensor nodes. They are used for applications to avoid accidents in roadside [15]. For such applications, an event oriented and application specific MAC protocol (App-MAC) is proposed in this work. According to the application requirements and current event status, the time slots are allocated for the nodes. They have executed the protocol in TOSSIM simulator and in real time using Berkeley TelosB motes. It has also been proved that this protocol outperforms S-MAC and Traffic Adaptive Medium Access (TRAMA) protocols. The work [16] helps to understand the energy model used for mobile devices. In particular, to decide which type of protocol can be used for sending the multimedia files over wireless networks. The Reed Solomon (RS) MAC layer coding scheme is focused. For analysing the energy consumption, they have calculated the energy consumed by each computational unit of the RS decoder of ARM7TDMI test-bed in real time. And it has been concluded that using appropriate error free control block based on channel conditions required for the multimedia files will reduce the energy wastage significantly. Usage of two key physical layer parameters namely channel state and the residual node energy for the design of distributed MAC protocol is explained in detail in [17]. This design is aimed at improving the network lifetime. It has been suggested that when the network is young the sensor nodes are provided with better channels for data transmission and when the network is old, the nodes with more residual energies are given priority. Using this principle a protocol called Dynamic Protocol for Lifetime Maximization (DPLM) is proposed. It utilizes both the channel state and the residual node energy. Its results are also compared with the existing protocols. A cross-layer protocol named Low Energy Self-Organizing Protocol (LESOP) is presented in [18]. It uses the interaction between MAC layer and the application layer for high efficiency. This innovative model takes care of the error control and network energy consumption issues by using a QOS knob. This is the first work using Embedded Wireless Interconnect (EWI) architecture platform instead of the traditional OSI layer. It is a light weight protocol using only 2 layers to reduce the complexity. Fallahi, Afshin, and EkramHossain developed a queueing framework for analyzing their newly proposed distributed and energy aware MAC protocol [19]. In that protocol, a node is assumed as a priority queue with a low priority and high priority traffic. The node"s MAC layer is modeled as a server and a vacation queuing model is used to model the sleep and wakeup mechanism of the MAC layer. The factors such as packet dropping probability, access delay, and queue length distribution, for high-priority packets and also the energy saving factors are analyzed in this framework under different conditions. They have also validated this protocol using extensive simulation. Even though there is a new standard -IEEE 802.11a/b/g for supporting multiple data rates in Wireless LANs, there is always a difference in the availability of high data rate between the node near the access point and the one in the far away place near the border of the access point"s range. A study using the combination of Medium-access and next-hop address lookup based on fixed-length labels without taking into account the host protocol stack was done in [20]. And based on that they have proposed Energy-Efficiency Cut-Through Protocol which selects the appropriate PHY model and a transmission power level that to achieve the maximum possible energy efficiency. The work in [21] describes the usage of network coding in wireless networks along with MAC). Network coding has a lot of advantages. But the properties of wireless networks necessitate the time-varying network coding to interact with the MAC layer. This is contradictory with the classical approach used in wired network coding. A new method is presented in their work to construct linear wireless network codes by interacting with MAC schedules. Another method is also presented which creates conflict-free transmission schedules by splitting the wireless network into subtrees and applying graph coloring on them. Then the normal routing is compared with that of this network coding in terms of energy, delay and throughput. Even in the recent survey paper [22], LEACH is taken as the important energy efficient clustering and scheduling protocol as the benchmark protocol. Hence that is taken as the first protocol for comparing the result of implementation of the proposed algorithm. A new radio technology, Impulse-based ultra wideband (I-UWB) for large scale sensor networks was given in [23]. MAC protocols for I-UWB is centralized. But when the network size increases, only distributed MAC can be used. So a single protocol stack is impossible. Three MAC protocols are proposed. Two multi channel protocols, namely multichannel pulse sense multiple access (M-PSMA) and multichannel ALOHA and a busy-signal protocol, called Busy-Signal Multiple Access (BSMA). The simulation of the physical layer confirms the feasibility of the proposed protocols in wide WSN environments. The results show that the BSMA outperforms other centralized TDMA protocols, and has more energy efficiency when compared with that of the other distributed protocols.

2-1-Non Orthogonal Multiple Access (NOMA) Systems
The traditional Time/Code/Frequency Division Multiple Access come under the category of Orthogonal Multiple Access Scheme. The System described here uses Time Division Multiple Access Mechanism where the different nodes in the WSN will be using the same frequency band but each one will be given different time slots. Similarly the other two namely Code and Frequency division Multiple Access use different code sequence and different frequency bands to allot for multiple users or multiple nodes in a Wireless Sensor Network respectively. Nowadays, the Non Orthogonal Multiple Access scheme allocates multiple users or nodes for medium access in same time, frequency and code by using different factors of Power and Code. In the work presented in [24], for a mixed type traffic, a new type of resource allocation mechanism was described for both distributed and centralized Antenna types. A new scheme called green NOMA is used in the work of Basnayake et al. [25]. A comparison on energy efficient NOMA schemes were given elaborately in their work. The schema, they have proposed is mainly designed for multiple access in 5G communication. But for monitoring of harmful radiations in a remote environment, a simple yet efficient mechanism is required. Hence TDMA based multiple access scheme is used throught in the work presented here.

3-Distance based Hierarchical Clustering
The WSN explained in this work clusters the nodes in a hierarchical manner. Randomly a node is taken as the initial node. From that node, the other nodes which are only one and two hops away are formed as a cluster. If a node goes out of this distance, then that one becomes the initial node for the next cluster. The first node which comes out of this condition is taken as the initial node for the second cluster. Euclidean distance is used for the cluster formation. The underlying concept is that the nodes within a short distance are grouped as a cluster. In our test bed, 25 meters is set as maximum allowable distance between any two sensors in a cluster. The distance between the other sensor nodes from the random first node are calculated and decided to be placed in the same cluster or a different one using this 25 meters. Repeatedly this clustering process is done until all the nodes are associated with a particular cluster.

3-1-Algorithm
Clustering here is completely based on proximity. 25 meters is kept as the maximum distance of coverage for any node within a cluster. If any node"s location is out of this range, Fig. 1. Cluster formation using the proposed clustering algorithm using three different starting nodes Fig.2. Architecture of LECSA then that initiates the process of next cluster formation. This simple strategy is followed as algorithm (given down) for clustering.
Step1: Start the outer for loop Step2: Start the inner for loop with a limit of "n" nodes Step3: Calculate Euclidean distance (dis) =((S(i).xd)-Xk)2 + ((S(i).yd)-Yk)2 Step4: Calculate d= √ Step5: If calculated value is greater than 25 and also the node S(i)"s flag is false, do: Set S(i).C as 1 Set S(i)"s flag as true Plot the node S(i) using a specific color Mark the node id Step6: Close the inner for loop Step7: Start a small for loop with limt "n" Step8: Check for S(i).flag value. If it is false, store its location Step9: Close the inner for loop Step10: Close the outermost for loop A Boolean variable is used for every node to indicate whether it is inside any cluster or not. This algorithm can be used for clustering of any number of nodes as it is proximity based. But the drawback here is the cluster size, which differs based on the distribution of nodes on the field. For the work presented here, 100 nodes are used. By applying the algorithm, six clusters are formed (Fig.1) The turn of becoming the Cluster Head (CH) depends on "α"-the node weighting parameter. For the first round, random values are assigned for α for finding the CH. For the remaining rounds, this is calculated based on the payload (L) and residual node energy (E) using equation (1).
Forwarding of data from nodes to the base station happens in an order based on the value of alpha. This value is taken as the critical parameter for the entire scheduling algorithm explained in the next section.

4-Load and Energy Consumption based Scheduling Algorithm
The main function of any MAC protocol is to control the usage of the medium, and this is done through a channel access mechanism. It provides a scheme to divide the main resource that is the medium between the sensor nodes. TDMA based schemes provide inherent collision free access mechanisms. Hence this research work is focussed on developing energy efficient TDMA based MAC Protocol for scheduling the nodes. According to the proposed scheduling scheme (Fig.2), whenever a node of a cluster senses some data, its residual energy has to be checked initially (using equation (2)). (2) If the residual energy of a node is positive, then according to it"s α, a slot is allocated. During the allotted slot, the data sensed by the node is sent to the one which is having the next biggest α in the schedule. During every round, the CH collects the data from all its nodes at the end. Automatically the node which occupies the last slot gets the position of CH. The maximum "α" value will be held by the CH. The sink node gets the data from the sensing node by strictly adhering to the schedule. It follows the pattern of a CH passing its payload to its nearest neighbour in the next closer cluster. That particular node passes the data to its CH. This pattern is used throughout until the data reaches the Base Station (BS).

5-Analysis of the Proposed Scheme
The performance of the proposed schemes is analyzed by the simulation for three iterations. Because of using the proposed Clustering and Scheduling schemes, dynamically the CH changes every time inside each cluster. So the node acting as CH will not drain out fast. Fig.3. depicts this. Let us take cluster No.1 and analyze. The comparison is done for checking the dynamic nature of CH by analyzing the nodes having CH responsibility in three iterations. The graphs given in Fig.3. shows how dynamically the CH position is changing. From this we can also infer that only two or three nodes are getting the CH position repeatedly. The overall energy of the WSN, at the end of certain rounds is also compared. That tabulation for the first, second and third iterations are given in Fig.4, Fig.5, Fig.6

5-1-Comparison based on Percentage of Energy loss with the Existing Protocols
The The results are shown in Fig.7. The network simulation is done in NS2. Based on the data given by the authors of the similar protocols mentioned in the previous paragraph, the following inference is made.
From the values given in table (Table 4), it is obvious that the work proposed runs efficiently in terms of energy than that of the existing algorithms like LEACH, SCA and MR-LEACH, where balance in energy is achieved by adjusting among the sensors in each cluster and also compared with EECA where the cluster heads are alone assigned with weights to achieve energy efficiency. ACT is the algorithm which gives only 50 % energy loss after 600 rounds. They used the strategy of changing the cluster radius. But this strategy cannot followed for complex networks [26].

6-Conclusion
From the outcomes of the simulations, it has been observed that the nodes will not get depleted of energy as fast as that of the existing algorithms (Except ACT). The high priority is always given to the node with least energy. This simple technique reduces the overall energy consumption. Some limitations are 1) the developed LECSA is suitable only for WSN with multiple nodes used in Environmental Monitoring applications. 2) Nodes with camera as sensor, sends and receives video using compression [27] (T.Bernatin and G.Sundari 2015). For those types this protocol is tough to be implemented, since data aggregation leads to loss in actual video. 3) This algorithm design is applicable for Wireless Sensor Nodes working on Zigbee radio having low range communication. Accordingly, the distance is maintained between the nodes. In future, along with the parameters namely residual node energy and load, other parameters like distance, location and data priority of the node can also be taken for assigning the slots for scheduling. The entire algorithm was designed and implemented according to TDMA based multiple node access scheme. NOMA is the recently used multi access strategy and many research works in WSN and IOT are being carried out using this scheme. Hence the same implementation presented here can be extended in future using the NOMA.