Zigbee Routing Opnet Simulation for a Wireless Sensors Network

—Wireless sensor network are nowadays considered as a viable solution for medical application. A zigbee network model is more suitable for battery capacity, bandwidth, and computing limitation for WSN. This paper will present an Opnet simulation of a zigbee network performance in order to compare routing results in 3 different topologies (Star , Mesh and Tree).


INTRODUCTION
The miniaturization of the sensors, the increasingly low cost, the broad range of the types of sensors available as well as wireless support of communication, allow the networks sensors to develop in several applications .They also make it possible to extend the existing applications.The sensors network can appear very useful in many applications when it is a question of collecting and processing data coming from the environment.Among the fields where these networks can offer the best contributions, we quote : military , monitoring, environmental, medical, domestic, commercial, etc.
We could imagine that in the future, the monitoring of the human being vital functions would be possible thanks to microsensors which could be swallowed or installed under the skin [1].Currently, of the micro-cameras which can be swallowed exist.They are able, without having recourse to the surgery [4], to transmit images of the interior of a human body with a 24 hour endurance [5].Other ambitious biomedical applications are also presented, such as: monitoring of the level of glucose, the monitoring of the vital bodies or the detection of cancers.The use of the networks of sensors in the field of medicine could bring a permanent monitoring of the patients and a possibility of collecting physiological information of better quality, thus facilitating the diagnosis of some diseases [6].

II. ZIGBEE:
ZigBee is a LP-WPAN (Low Power-Wireless Personal Area Network): it is a wireless network with short range and low power consumption.It is characterized by a range of a few hundred meters and a low flow (250kbit/s max) [2].The standard was conceived to inter-connect embarked units like sensors.
It is based on the standard IEEE 802.15.4 for the physical and data link layers proposes its own other layers (network, etc) [2].The difference between ZigBee and the majority of the other WPAN are the use of the medium; ZigBee is optimized for a weak use of the medium shared by all, for example 0,1% of time.
Typically, a transmitting receiving ZigBee module will occupy the medium during a few milliseconds in emission, will await possibly an answer or an aquitiment , then will be be in stand by for a long period before the next emission, which will take place at one predetermined moment.This need introduces interesting problems of research, in particular on the level of the data link layer (Delay , storage and access to the medium) and network (routing respecting energy constraints).ZigBee envisages two types of entities network: the FFD (Full Function Device) implement the totality of the specification and the RFD (Reduced Function Device) are entities reduced in an objective of less power consumption and less memory use for the microcontrolor.
RFD are necessarily final nodes of the network because they does not implement a routing mechanism.Typically, an embarked sensor will be RFD and supplied with batteries, whereas a central processing unit of treatment, supplied with a source not forced by an energy containte (hand powered), is FFD with the function of routing.IEEE 802.15.4,ZigBee can work on three frequency bands: 868MHz (Europe), 915MHz (North America) and 2,4GHz (World).The standard envisages two different physical layers (PHY), for the 868/915MHz (PHY868/915) and a second for 2,4GHz (PHY2450) implementing a spread spectrum modulation.

A. Zigbee protocole:
The ZigBee pile is composed of several layers of which the physical layer (PHY), MAC layer, layer network (NWK), underlayer support application (APS) and ZigBee Device Object (ZDO).In the following figure is the ZigBee pile with its layers.www.ijacsa.thesai.orgThe physical layer (PHY), defines the physical operations of the ZigBee equipment by including the sensitivity of the reception, number of the channels, the power transmission , the modulation and the specifications of the transmission rate.The MAC layer manages the transactions of data RF between the neighbours nodes (point-to-point).This layer includes the services such as the management of retransmissions and payments without forgetting the techniques to avoid collisions CSMA-CA.
The network layer (NWK) adds the capacities of routing which allow the RF data to cross several equipment (multiple hops) for router the data since the source towards the destination (peer to peer).
This layer manages also the mechanisms of neighbors discovering , routes discovering and maintaining , mechanism to join or leave the network etc.
Application support (APS) is an application layer which defines various objects of addressings including the profiles, the clusters and the end devices.
ZigBee Device Object (ZDO) is the applicative layer which provides the functionalities of discovering equipment and services, it includes also the advanced capacity for the management of the network.It defines also the role of the nodes in network for example coordinator or end device.
Security Services Provider (SSP) manages MAC security only for the MAC frame , the security of the network for the NWK frames of order and safety for APS frame .The characteristics of this layer are the authentification, the encryption, the integrity of the message etc.

B. Topology:
The standard IEEE 802.15.4 envisages two topologies: star (star -all the nodes communicate with a central node called coordinator) or point-to-point (peer to peer -all the nodes with radio range can communicate together without hierarchy).The formed network is called PAN [2].The network layer of ZigBee allows the creation of mesh topology thanks to an automatic routing: it is topology with a grid, or mesh topology.
Three topologies can be considered in the installation of a ZigBee network:  Star topology  Tree topology  Mesh topology Star topology ( figure 2) is simplest and the most limited among all Zigbee topologies.It's made up of central equipment (coordinator) and the other equipment of the network (router, end device).Each equipment of the network can only communicate with the coordinator.Consequently, to send a packet from one equipment to the other, this one must pass through the coordinator who will send the packet towards the destination [2].The disadvantage of star topology is that there are no alternate routes if the link between the coordinator and the end device fails.
The other disadvantage of this topology is that all the packets must pass through the coordinator, this last can be saturated with a great number of packets and like result, we have a congested network.
The Tree topology ( figure 3 ) is made up of a coordinator to which other equipment are connected.The coordinator is related to the several routers and end devices (his/her children).A router can be also connected to several routers and end devices and that can continue until a certain number of levels.This hierarchy can be visualized like a structure of tree with the coordinator at the top.The router can be used as an end device in the tree of the network, but in this case the functionality of diffusion of message is not used.In tree topology, the coordinator and the routers can have children, therefore they can be parents.On the other hand, the end devices cannot be parents and cannot have children either.
The children can communicate only with their parents, while the parents can communicate with their children and their own parent.The disadvantage of this topology is that there is no alternate road if the bond necessary to reach the destination fails.www.ijacsa.thesai.org The Mesh topology ( figure 4 ) has a structure similar to that out of tree with a coordinator at the top of the tree.In a mesh topology, the coordinator is related to his children (routers, end devices), it can also be related to several routers and end devices (his/her children).
However, rules of communication are more flexible because the routers can communicate directly between them.A mesh topology is characterized with a more effective propagation of the packets [2] , that means that alternate roads can be found if a bond breaks down or if there are congestions.A discovery of road is planned for makes it possible the network to find the best way available to convey the packet.

A. Simulation
To simulate a ZigBee network, OPNET proposes models of peripherals for the ZigBee coordinators, routers and end devices .Main goal of the simulation of network is to analyze the performances of a ZigBee network in a context WSN.The WSN can vary from few meters to several thousands of meters, for example, agricultural applications and environmental often extend at long distances while the residential construction applications can be much smaller [6].In addition, certain WSN use only few of sensors as end devices others employ hundreds, and sometimes even thousands of devices .ZigBee operate numerous protocols in order to determine the optimal way to take for the routing the packets.This section will discuss the results of some OPNET simulation of 3 differents topologies tree , mesh and star in order to discuss a comparasion and see wish is more suitable for a WSN in the medical field depending on the network requirement .The number of hops for the star topology is equal 2 wish mean that the source and the random destination have another intermediate node wish relays the data ( the coordinater ).
The number of hops for the tree topology is equal 5 as we set the network depth to 4 , the mesh topology uses a routing table.End to End delay ( figure 7 ) is a measurement of the network delay on packet and is measured by the time interval between when a message is queued for transmission at the physical layer until the last bit is received at the receiving node.
Our end to end delay results of the 3 topologies star and Mesh have close end to end delay in this simulation .The end to end delay of the tree is higher for more than 50% .