Discrete Events Simulator for wireless sensor networks

This paper investigates a discrete events simulation of wireless sensor networks routing protocols. We propose a discrete events simulator called SENSIM (SENsor networks SIMulator). In this simulator, Flooding and Gossiping of linear routing class protocol, PEGASSIS of hierarchical routing class protocol, and MFR of localization based routing class protocol are implemented. The implementation of these protocols is based on a system of a car parking application. Simulation results show that PEGASSIS is the best routing protocol which offered the best network lifetime.


INTRODUCTION
The development of wireless and mobile networks opens a new area in the telecommunication domains.The wireless communication became one of the most recognized technologies; it offers open solutions to provide crucial services where the installation of cable based infrastructure is impossible or mainly difficult.
However, to make this type of communication attractive, flexible and with fewer infrastructures, a new generation of networks, called wireless sensor networks, appear.These sensors contain devices of sensing and wireless communication in only one circuit, with system on chip design and cost-effectiveness.
Nevertheless, one of the major problems in this type of networks is the energy consumption.The emission and reception of the packet, at the time of the communication process, is so costly is in term of energy.Hence, routing protocols were proposed to alleviate this drawback.
Majority of these protocols are not implemented under the existing simulators like NS-2, OMNet++, GloMoSim, SENSE, TOSSIM, BOIDS, Shawn,…etc.This motivates the proposition of a discrete events simulator called SENSIM (SENsor networks SIMulator).In this simulator we implement four routing protocols, which are Flooding, Gossiping, PEGASSIS and MFR.In this implementation we show a comparison between protocols of different classes (Flooding and Gossiping of the linear routing class protocol, PEGASSIS of the hierarchical routing class protocol, and MFR of the localization based routing class protocol) in term of network lifetime.Simulation results showed that PEGASSIS can increase the network lifetime by 65% than the other protocols.
The remainder of the paper is organized as follows: Section 2 reviews some background for routing protocols in wireless sensor networks.A description of a system design for the simulation of Flooding, Gossiping, PEGASSIS and MFR routing protocols is given in Section 3. In Section 4, we discuss simulation results and we conclude the work in Section 5.

BACKGROUND
Routing in wireless sensor networks can be classed, according to the structure of the network, in: linear routing, hierarchical routing and localization based routing.In linear routing, all sensors have typically the same task.However, in the hierarchical routing, sensors process differently in the network and have a various tasks.In the localization based routing, the position of the sensor is used to route the data in the network.
A routing protocol is considered adaptive when some of the parameters the system can be controlled in order to adapt them to the network environment or to the available energy.Moreover, these protocols can be classified, according to their functionalities, in multi-tracks routing techniques, question based routing techniques, consistency based routing techniques, negotiation based routing techniques or QoS based routing techniques.
Moreover, routing protocols can be also classified (according to the path that uses the source to find its destination) in proactive protocols, reactive protocols and hybrids protocols.In proactive protocols, all routes from the source to the destination will be calculated in advance, whereas in the reactive protocols, routes are calculated on demand.The hybrids protocols combine the advantages of the proactive and the reactive routing protocols.
Flooding routing technique [1] (of linear routing class) is a naïve mechanism to broadcast data across the sensor network.In this approach, each sensor receiving a data packet broadcast it to all their neighbors until the packet reached their maximum hops (flooding the network).
Gossiping [1] (of linear routing class) is a variant of Flooding technique in which a sensor receiving a packet does not broadcast it to all their neighbors, but send it to one of the neighbors selected randomly.Indeed, each sensor in the network chooses randomly one sensor from their neighbors to send it the received packet; once the neighbor receives the packet, it chooses randomly one sensor from their neighbors to send it the packet until it reaches the sink.PEGASIS (Power-Efficient GAthering in Sensor Information Systems) [4] (of hierarchical routing class) is an amelioration of the LEACH protocol [3].Indeed, instead of forming multiple groups of sensors, the protocol builds a chain of sensors where each sensor can only communicate with its nearest neighbor.In the same way, only one sensor of the chain can communicate with the sink for just a time period.At the end of each time period, another sensor of the chain is selected to become the bridge between the chain and the sink.
Takagi et al were proposed the first localization based protocol, called MFR (Most Forward within Radius) [6].In MFR, each sensor receiving the packet sends it to one of their neighbors selected according to its position in which the orthogonal projection is closest to the position of the sink.This process continues until the packet reached its destination (the sink).

SYSTEM DISCRIPTION FIGURE 1: Car parking system
The implementation of the protocols is based on the system of a car parking application (Figure 1).This parking has 359 of parking place and one agent at a principal portal.To manage this parking, 539 of sensors will be deployed in all its area (when 359 are sensors parking, and 180 are routing sensors) with one sink, all deployed in a grid form.The descriptive variables of the system are described below: The sensors: there are two kinds of sensors: -Parking sensors: each parking place will be affected by one sensor that sense the parking and the departure of the car; -Routing sensors: they are used to sense the possible breakdowns of cars and participate to route the data.
The sink: is placed at the principal portal.It is an interface between the network and the agent and, is responsible for gathering the data of the network.
The agent: it collects the data from the sink to manage the parking.
Messages: the sink and the sensors exchange periodically messages.
Cars: they are the clients of the system that require parking places when reached the system.
The implementation of the protocols is based on the discrete events simulation.The events which can occur during the time and which causes state changes of the descriptive variables of the system are presented below:

Event Description Arrival
This event occurs when a car arrive at the principal portal.The agent reserves a place and records some information about the car (for example: car identifier).When all the places are assigned, the car leaves the system.Parking This event occurs when the parking Legend: The Sink

Parking sensors
Free place Reserved place Occupied place

Routing sensors
No breakdown Breakdown occurs

S
sensor sense a car.

Departure
This event occurs when the car quite its parking place.

Breakdown
This event occurs when the routing sensor sense a breakdown of a car (when the car quite its parking place and stay a certain time at the routing sensor place).

Quite
This event occurs when the car having starting problems.

TABLE 1:
Discrete events of the system.

SIMULATION RESULTS
The routing protocols Flooding, Gossiping, PEGASSIS et MFR are implemented on a discrete events simulator, developed with C++ language and called SENSIM (SENsor networks SIMulator).This simulator implements the algorithms of the four routing protocols on the platform of the parking system.The The parameter of evaluation of the described system is the network lifetime.This is the interval of time which separate the time of the deployment of the network from the time in which the first sensor exhausts totally its energy.

Discussion
The Flooding protocol uses 99% of the average network energy at a number of events equal to 100000 (which is equivalent to the lifetime of 46 days, 20 hours and 36 minutes).The exhaustion of the energy of the network is due to the participation of all the sensors of the network in the routing process (i.e. the drawback of the flooding technique).
The Gossiping protocol uses 83% of the average network energy at a number of events equal to 14500 (which is equivalent to the lifetime of 6 days, 12 hours and 12 minutes).Unlike Flooding, where all the sensors participate in the routing process, Gossiping protocol uses just some sensors (but a large part) of the network to route the packets (one sensor can participate several time in the routing process for a given event).
MFR uses only 4% of the average network energy at a number of events equal to 140000 (which is equivalent to the lifetime of 65 days, 17 hours and 40 minutes).The quantity of energy used by MFR is very low compared to that of the other protocols.This is due to the use of a minimum and a sufficient number of sensors to route data (in MFR each sensor send the packet to the sensor nearest to the sink).
PEGASSIS uses only 10% of the average network energy at a number of events equal to 245000 (which is equivalent to the lifetime of 113 days, 10 hours and 27 minutes).In fact, PEGASSIS uses only the sensors of the chain which result in a moderate consumption of the average network energy.Unlike MFR which uses frequently the same hot point (closest to the sink) to route the data to the sink, PEGASSIS uses one of the three hot points of the used chain (one of the three sensors closest to the sink).Hence, the network lifetime of this protocol is larger than that of the other protocols (Flooding, Gossiping and MFR).

CONCLUSION
In this paper, we showed an implementation of the routing protocols in wireless sensor networks.This implementation is based on a system of a car parking application, and developed on a proposed discrete events simulator platform called SENSIM (SENsor networks SIMulator) where the routing protocols Flooding, Gossiping, PEGASSIS and MFR were implemented.Simulation results showed that Flooding and Gossiping uses a large amount of energy to route data.Whereas, PEGASSIS is the best routing protocol that offer the best network lifetime, and MFR the best routing protocol that uses the very small amount of energy to process.
As future works, we implement other well known protocols and new protocols, for routing in wireless sensor networks, on the proposed simulator SENSIM, in order to compare them and highlight their improvement in term of prolongation of the network lifetime.

TABLE 2 :
table below summarizes the various parameters of simulation drawn from previous works in the simulation of the sensor networks [2] [5] Parameters of the simulation

TABLE 3 :
The simulation results of the different protocols are summarized in the following table: Network lifetime for the different protocols