International Journal of Pure and Applied Mathematics Volume 118 No. 18 2018, 4671-4678 ISSN: 1311-8080 (printed version); ISSN: 1314-3395 (on-line version) url: http://www.ijpam.eu Special Issue ijpam.eu

DESIGN OF NETWORK PROTOCOL USING OS A. Sophia Mary1, Dr. R. Kotteeswaran2 .Pandeeswaran3 1PG Scholar,Department of Instrumentation and Control Engineering, 2Assistant Professor, Department of Instrumentation and ControlEngineering, 3Associate Professor, Department of Electronics and Instrumentation Engineering,St.Joseph’s College of Engineering, Chennai 600 119, Tamil Nadu, India. [email protected],[email protected],[email protected] CSMA MAC driver enhances the delivery rate by just I.INTRODUCTION adding a slightly more delay in comparison to Wireless Sensor Networks (WSNs) are gaining market NullRDCMAC. In case of RDC drivers, traction in numerous industrial segments because they are both cheaper and faster to deploy than their wired counterparts. They consist of tiny sensing devices for ContikiMAC driver has significantly higher delivery rate wireless communication, monitoring, and control. than other RDC drivers. The NullRDC reveals the lowest Generally, the nodes are low cost and low power, perform average delay, while consuming more power than other multiple functions, and communicate in short distances. The RDC drivers by keeping the always on. Thus, by benefits offered by these networks compared to wired choosing the proper MAC and RDC drivers in ContikiOS,in networks, such as simple deployment, low installation cost, order to increase performance, reliability, timeliness and lack of cabling and high mobility, they are especially power efficiency based on application requirements can be appealing for industrial control and monitoring achieved. The comparative study between different MAC applications.Emerson Process Management estimates the protocols will be analyzed using ContikiOS. However, the WSNs enable cost savings of up to 90% compared to the existing MAC designs in Contiki are limited and they may cost of wired field devices[1]. Several market forecasts have have some restriction in various Contiki versions. Further recently predicted exponential growth in the sensor network MAC protocol design requirements can be stated as follows: market over the next few years, resulting in a multi-billion- 1. Energy efficient protocol is necessary dollar market in the near future. WSN has some demerits as 2. Designed protocol should be suited for all well. nodes are limited in power, computation applications. capacity and memory [3]. To design a protocols that are 3. Designed MAC protocol must be used for communication in a sensor network must have a compatible for larger network priority focus on power consumption. These protocols must communication. have inbuilt mechanisms that give the option to end users to prolong network life time as a trade-off for lower throughput III. WSN (WIRELESS SENSOR NETWORK): and higher delay.In order to realize this potential growth, Wireless Sensor Networks are networks that emerging technologies and new protocols are required for consist of sensors which are distributed in an adhoc manner. communication compatibility in wide range of applications. It is deployed over a geographical area for monitoring Up till now a significant amount of research on energy physical phenomena like temperature, humidity, vibrations, efficient protocols has been come up but to the best of our seismic events and so on. Each of these scattered sensor belief none of the MAC protocol is best suited for WSNs. nodes has the capabilities to collect data and route back to the sink and end user. The sink may communicate with the II. PROBLEM STATEMENT: task manager node via Internet or Satellite. The most To design a MAC protocols for WSNs is major common WSN architecture follows the OSI architecture concern in recent years. For self-sustained sensor depending model shown in the figure1. on the required mission time, energy supply can be trivial (applications with a few days of usage only) or a challenging problem. The lifetime of a WSN becomes a very important part. Evidently, an energy efficient protocol for WSN is necessary. There are a number of approaches to analyze theenergy efficiency of various existing MAC protocols. They compared various MAC designs by evaluating them in terms of average delay, delivery rate and overhead. The analysis of the result concluded that the

4671 International Journal of Pure and Applied Mathematics Special Issue

searches the optimal path that has less energy consumption, or low delay, or other good features. 5. Data link layer: It handles neighbouring nodes communication issues. Sometimes the data link layer is called the Medium Access Control (MAC) layer. MAC is part of data-link-layer tasks because BR Internet MAC only takes care of the wireless-medium- sharing issues among 1-hop neighbours. MAC BS Target ensures that all neighbouring sensors do not cause signal transmission conflicts, while a data link

layer may handle error detection, data framing etc. 6. Physical layer: It converts meaningful data to Position Finding System Mobilizer Sensing UnitProcessing Unit Transmission Unit wireless signalling/modulation and other wireless communication modules. This layer can understand ―signal’ such as voltage levels(―0‖ or ―1‖).

Sensor ADC Processor Transceiver Storage III RELATED WORK 3.1 MAC PROTOCOLS Power Unit Medium Access Control(MAC) is the protocol Figure1Architecture of WSN layer above the Physical Layer(PHY) and it is considered as The protocol stack used by the sink and the sensor nodes a part of Data Link Layer(DLL) shown in figure 3. The consist of five types of layers to achieve successful sensed- main function of any MAC protocol is to control the access data collection shown in below figure 2. of a number of nodes to a shared medium in a way such that certain application-oriented performance requirements are RECEIVE fulfilled[6] TRANSMIT DATA DATA MAC (medium access control)

Application Layer

Transport Layer LogicalLin Contension TDMA

k Control based based Network Layer MediumA Hybrid Data-Link Layer ccess

Control Physical Layer ER(EMERGENCY RESPONSE)- MAC

ET(EMERGENCY THRESHOLD)- PHYSICAL LINK MAC Figure 2 WSN Protocol stack CONTIKI MAC 1. Application layer: This layer take care on sensor node data display format and performs sensor CX MAC database management. If the sensor data has to be displayed on NULL RDC MAC 2. Internet Web pages, the application layer needs to understand Internet application layer protocols, Figure 3 Classification of MAC protocols such as HTTP. 3. Transport layer: The TCP is a typical transport layer protocol. The main functions of transport 3.1.1CONTENTION BASED MAC PROTOCOLS: layer are: Contention based MAC protocols are the simple (a) To achieve ―end-to-end‖ (E2E) protocols while considering setup and implementation reliable data transmission. process. In this protocol design the nodes will contented for (b) Reduce network congestion. the channel in many ways to utilize the channel for data The TCP achieves E2E reliable transmission through packet transmission and reception. Earlier the protocols like such as retransmission and time-out check and it also reduces ALOHA and slotted-ALOHA have higher collision data network congestion through data-rate control. which will limit the throughput[7]. 4. layer: It achieves hop-to-hop data Carrier Sense Multiple Access (CSMA) based protocols forwarding among number of many sensors. It reduce the collision but does not completely eliminate the

4672 International Journal of Pure and Applied Mathematics Special Issue

collision and it may lead to throughput degradation8]. If the the receiver will be in ON state for packet reception. Then it node density increases the performance will be greatly acknowledges the sender. It uses precise timings between affected due to increased collision in Machine-to- the data transmissions. In addition it makes use of fast sleep Machine(M2M) communication. So it makes the optimization which quickly detect false positive awake ups contention-based MAC protocols and suitable for Machine- and a transmission face-lock optimization for energy to-Machine communication. efficient operation[11]. The mechanism used for ContikiMAC wake-ups is the Clear Channel Assessment 3.1.2CONTENTION-FREE MAC PROTOCOLS: (CCA) mechanism. It uses the Received Signal Strength Contention-free protocols remove the problems Indicator (RSSI) of the radio transceiver to give an caused by collision by pre-allocating transmission resources indication of radio activity on the channel. If the RSSI is to the nodes in the network. TDMA type protocol have poor below a given threshold, the CCA returns positive, time synchronization requirements that are difficult to indicating that the channel is clear. If the RSSI is above the implement and result in more power consumption. threshold, the CCA returns negative, indicating that the Code Division Multiple Access(CDMA) protocols have channel is in use. poor flexibility and are not very efficient at low loads. This makes them unsuitable for low cost M2M communication. 1.2.2 CxMAC: FDMA requires additional complicated band pass filters that CxMAC was introduced to overcome the problems lead to high cost. FDMA is less suitable for low-cost faced in low power listening. In LPL, long preamble is used devices when compared to TDMA and CDMA[9]. which leads to more energy consumptions at both the sender and receiver. The target receiver has to wait for the full 3.1.3HYBRID MAC PROTOCOLS: preamble before the data reception. But in CxMAC, the Hybrid Mac protocols is a combination of address information of the target is embedded in the Contention based and Contention-free approach of MAC preamble itself so that the non-target receivers can quickly protocols. TDMA (Time Division Multiple Access) is a go back to sleep state. To reduce the waiting time of sender schedule based MAC protocol which has been reviewed to CxMAC allows the receivers to inform about their be best during high traffic condition avoiding much of availability, even in the middle of the preamble colliding problems whereas it suffers certain disadvantages transmission. This short strobed preamble technique as it needs global synchronization, does not easily adapt to increases the energy wastage in waiting for the whole changes in network topology and it is difficult to ascertain preamble to complete. Non target receivers which overhear interference among neighborhood nodes (interference the strobed preamble can go back to sleep immediately. irregularity). CSMA (Carrier Sensing Multiple Access) is a contention based MAC Protocol, which provided fine results 3.1.3 NullRDCMAC: during less traffic levels whereas experienced hidden NullRDCMAC uses framer functions for header terminal problems and hence chance of packet collision is functions/parsing. It works as a pass through layer that only more[10]. To make use of the advantages of both transmit a packet and retains the results of such approaches and to compensate for their disadvantages, transmission(success or collision). hybrid MAC protocols are being used. The Hybrid MAC NullRDC has two main tasks; (i) it uses framer functions to protocols used in this work are ContikiMAC, CxMAC and create a header, and (ii) it simply checks if the packet was NullRDCMAC. received or a collision has occurred. It does not take any consideration to energy saving at all as it keeps the radio SENSOR MODES always on {15}

V.SIMULATIONAND METHODOLOGY The operating systems that is to be used is called TRANSMISSION RECEPTIO IDLE POWER SAVING Contiki. It is an open source, highly portable and multi- N tasking for configuring sensor nodes. It is WAKEUP SLEEP designed for network systems with small amounts of memory [12]. The programs in Contiki are written using C Figure 4 Radio duty cycling language. ContikiOS uses COOJA simulator (Contiki Object The figure 4 above shows the duty cycle, defined as the Orientated Java Simulator). Using COOJA various types of fraction of time nodes which are active during their lifetime. motes like sky mote, Z1 mote,etc., can be used and individually programmed with unique code for each. Instant 3.2.1 ContikiMAC: Contiki is a pre-installed virtual machine that runs on ContikiMac is a Radio Duty Cycling Protocol that Ubuntu OS with COOJA pre-installed[13]. A simulation employs periodic wake-ups for packet transmission from network based on 6LoWPAN standard with unique IPv6 neighbours.During wake up state, if the packet is detected,

4673 International Journal of Pure and Applied Mathematics Special Issue

addressing capability implemented for client and VI.RESULTS AND DISCUSSION configuration in COOJA environment is shown here: 1. VARIATION IN CHANNEL CHECK RATE:

All the simulations in this work are tested for star topology.

Node 1(client) acts as the center hub and the other nodes act The results show that ContikiMAC has the average delay by as server nodes. Once the simulation is started, the message a good margin. On increasing the channel check rate, for packets(payload) will be transmitted from client to servers. the ContikiMAC, the delay increases due to retransmissions. The server nodes will acknowledge the client that they CxMAC shows lesser delay at higher check rates. received the message. ContikiMAC increases delay while CXMAC decreases and The purpose of the simulations is to find the NullRDC stays unchanged. average delay for various network conditions. It is planned to analyze the end-to-end delay by changing the various network parameters like channel check rate, payload and transmission range for different MAC protocols supported by Cooja. Here the MAC driver used is CSMA driver.Radio Duty-Cycle(RDC) layer takes care of the sleep and wake-up strategy of nodes. This is the most important layer because it is the one responsible for deciding exactly, when the packets will be transmitted and it is responsible for making sure that the node is awake when packets are to be received. The RDC drivers chosen for the simulation are ContikiMAC, CxMAC and NullRDCMAC.

5.1 Channel check rate: Channel check rate is the number of times per minute the node checks for the channel for activity.

5.2 Payload: Payload is the number of bytes in the message transferred from client to server or vice versa.

5.3 Transmission range: Transmission range can just be varied by just right clicking the simulation window and we can enter the transmission range.

Contiki MAC is having the lowest power consumption with channel check rate 8. It then increases for next CCR and further shows a gradual decrease. Power consumption ofCxMAC decreases with increase in CCR.NullRDCMAC remains unchanged for all values of CCR.

4674 International Journal of Pure and Applied Mathematics Special Issue

1. VARIATION IN PAYLOAD: 2. VARIATION IN TRANSMISISON RANGE:

All the three drivers show significant increase in delay with increasing payloads. But on comparing, Contiki MAC has The average end-to-end delay slightly increases as the been found to have the lower delay as the NullRDC has its transmission range increases for both MAC designs of radio always in ON state, which decreases the energy ContikiMAC and CxMAC. NullMAC is almost not affected efficiency. at all by the increases in transmission range, it maintains its low delay all the way.

The power consumption for all protocols doesn’t vary much for various payloads. It can be inferred that change in The transmission power of ContikiMAC remains constant payload will not affect the transmission and reception whereas the reception power increases for increase in power. transmission range. In CxMAC transmission power

decreases whereas the reception power increases for various

transmission range. For NullRDCMAC transmission power

remains constant whereas the reception power increase for

increase in transmission range.

4675 International Journal of Pure and Applied Mathematics Special Issue

.[7] N. Abramson, ―THE AlLOHA SYSTEM: Another alternative for computer communications,‖ in Proc. AFIPS VII.CONCLUSIONAND FUTURE ENHANCEMENTS: Conf., pp. 281–285, 1970. [8] L. Kleinrock and F. Tobagi, ―Packet switching in radio The results indicate that no single MAC protocol is channels: Part I—Carrier sense multiple-access modes and suitable for all situations, and it is highly dependent on the their throughput-delay characteristics,‖ IEEE Trans. scenario and application requirements. The amount of Commun., vol. 23, no. 12, pp. 1400–1416, Dec. 1975. [9] R. Rom and M. Sidi, ―Multiple Access Protocols: nodes, position of the nodes, amount of traffic and wireless Performance and Analysis‖. Berlin, Germony: Springer- environment greatly affect the performance of the drivers. It Verlag, 1990. is to be noted that, conclusions in this work are derived [10] L. Bao and J. Garcia-Luna-Aceves, ―A new approach to based on the scenario(star topology) assumed for channel access scheduling for ad hoc networks,‖ in Proc. experiments.NullRDC is a driver that performs well, but ACM 7th Annu. Int. Conf. Mobile Comput. Netw. with the expense of consuming more power as the radio is (MobiCom), pp. 210–221, 2001. supposed to be always on. This is an important issue as [11] , ―The ContikiMAC Radio Duty Cycling Protocol‖ in SICS Technical Report T2011:13 energy efficiency in many sensor network applications is ISSN 1100-3154 December 2011 one of the major requirements. Also NULLRDC is not [12] A. Dunkelset al., ―Low-power IPv6 for the Internet of suitable for the network where nodes need to run on battery Things,‖ 2012 Ninth Int. Conf. Networked Sens., pp. 1–6, power. Contiki MAC also offers a reasonable delay with 2012. reduced power consumption, high delivery rate and low [13] N. Abramson, ―THE AlLOHA SYSTEM: Another overhead.Future work of developing a own code protocol alternative for computer communications,‖ in Proc. AFIPS Conf., pp. 281–285, 1970. has to be designed for control and monitor applications. [14] F. Osterlind, "A sensor simulator for the Contiki OS," SICS, Research2006. REFERENCES [15] S. Kalyoncu, "Wireless Solutions and [1]MattiasOrell, ― Performance Evaluation of MAC AuthenticationMechanisms for Contiki Based Internet of protocols in Wireless Sensor Networks‖in: School of Things Networks," Halmstad University, PhD Thesis2013. Innovation Design and Engineering,Mälardalen University [16] ―Protocols and Architectures for Wireless Sensor Sweden,2016 Networks‖. Holger Karl and Andreas Willig Copyright  [2]Wei Ye, J. Heidemann, D. Estrin― An energy-efficient 2005 John Wiley & Sons, Ltd. MAC protocol for wireless sensor networks‖ in: [17]Michele Magno, VanaJelicic, Bruno Srbinovski, Proceedings of the IEEE Infocom, IEEE, New York, NY, “Design, Implementation, and Performance Evaluation of a USA, 2002 Flexible Low-LatencyNanowatt Wake-Up Radio Receiver‖ [3] Fundamentals of," wireless sensor networks‖, John IEEE transactions on industrial informatics, vol. 12, no. 2, Wiley April 2016. [4] Ying-Tsung Lee, Wei-Hsuan Hsiao, Chin-Meng Huang [18]PandeeswaranChelliah, PappaNatarajan, R.Snega ―Real and Seng-Cho T. Chou, ―An Integrated Cloud-Based Smart Time Implementation of Hybrid MAC Protocol Design for Home Management System with Community‖ Energy Efficiency and Reliability‖ IEEE Sponsored 2nd Hierarchy‖,IEEE,2016 International Conference on Innovations in Information [5] V. H. Bhide and S. Wagh, ―i-learning IoT: An intelligent Embedded and Communication Systems ICIIECS’15. self-learning system for home automation using IoT,‖ 2015 [19]Seung-Chul Son, Nak-Woo Kim, Byung-Tak Lee, Int. Conf. Commun. Signal Process., pp. 1763–1767, ChaeHo Cho, and Jo Woon Chong‖ A time synchronization 2015.[1] technique for CoAP-based home automation system [6] M. Rouse, ― (IoT),‖ WhatIs, p. 6, 2014.

4676 International Journal of Pure and Applied Mathematics Special Issue

4677 4678