Received 28 January 2016; accepted 13 August 2016; published 16 August 2016
Wireless sensor networks (WSNs) are the most versatile wireless technologies  , nowadays. A newer dimension of networks based on the IEEE 802.15.4 MAC and PHY  layer standard is the recent buzz in the market. It has gained global attention in the recent few years. These devices are small with limited transmission range and computing resources. The nodes are battery operated and can operate without battery replacement for several years. The efficiency of a sensor network can be achieved by optimizing the Total Link Cost between the nodes of the network. The two important factors that lead to an efficient sensor network design are 1) Power Consumption and, 2) the Quality of Service (QoS). Power Consumption deals with the distribution of energy among all the nodes throughout the network and QoS depends upon high routing efficiency under multihop transmission circumstances. Therefore, for designing such type of networks researchers must focus on both the energy consumption and routing efficiency.
IEEE 802.15.4  is a low rate-wireless personal area network (LR-WPAN) device. It consumes less power which can be widely used in the wireless sensor networks and the network lifetime can increase. A wireless sensor network is said to be efficient when the nodes are alive in the network and the routing of data is continuous. Thus Energy Scavenging is an important issue associated with Distributed WSNs which is based on the residual battery power. Hence, for the reliable prediction of average lifetime the analysis of energy consumption is compulsory. The most important sources of energy consumption are transmission and reception of data packets aggregated to the Sink Node, overhearing, idle listening of motes, collisions and packet overheads (multiple packets generated due to unicast or multicast). The rest of the paper is organized in the following manner: Section 2 provides an Overview of IEEE 802.15.4 specifications and security. Section 3 provides a brief Literature Survey related to the work proposed. The simulation model and various parameters are discussed in Section 4. The simulation results are analyzed in Section 5 and the final conclusion is discussed in Section 6.
2. Overview of IEEE 802.15.4 Specification and Security
IEEE and ZigBee alliance  have collaborated to form IEEE 802.15.4  . It is a standard which is designed for low rate wireless personal area networks (LR-WPAN). The IEEE 802.15.4 protocol defines the characteristics of the physical and data link layers for low rate wireless transmission. The physical layer supports three frequency bands i.e. 868 MHz, 915 MHz and 2.4 GHz of the ISM (Industrial, Scientific and Medical) bandwidth 1, 10 and 16 channels and supports Data Rates of 20 kbps, 40 kbps and 250 kbps respectively as shown in Figure 1. ZigBee is an open specification for low power wireless networking built on the IEEE 802.15.4 physical and MAC layer standard.
The ZigBee Protocol stack involves IEEE 802.15.4 for the physical and MAC layers alongside its backing for system and application layers and spots itself on top of the IEEE 802.15.4 layers as it appears in Figure 1. These devices are kept to work in the scope of 10 m. ZigBee supports different levels of security that can be designed relying upon the application’s needs. It incorporates systems for key establishment, key transport, frame security, and device administration   . ZigBee gives three sorts of security modes: private, standard, and high security. Private security is initially bolstered in the ZigBee 2006 standard  . This level of security obliges a system key to be shared among devices and is intended for lower security private applications. Standard security includes various discretionary security improvements over private security, including an application support
Figure 1. ZigBee protocol stack.
sub-layer (APS layer) connection key. High security (commercial) includes entity confirmation, and various different features not widely supported. This mode is expected to be executed for high security commercial applications. ZigBee high security uses three sorts of keys: master key, connection key, and system key. The master key is utilized for secure correspondence in the middle of hubs and the base station. The connection key is shared by two devices for secure unicast correspondence where as the system key is utilized for broadcast communications and is shared among all devices in the network; both of these sorts of keys can be upgraded periodically.
2.1. Function Devices and Modes of Operation
ZigBee devices are of three types:
・ ZigBee Coordinator (ZC): Also called as the PAN Coordinator is the most capable device, the Coordinator forms the root of the network tree and might bridge to other networks. There is exactly one ZigBee Coordinator in each network since it is the device that started the network originally by sending RREQ packets. It stores information about the network, including acting as the Trust Center & repository for security keys.
・ ZigBee Router (ZR): A router can act as an intermediate router for passing on data from other devices.
・ ZigBee End Device (ZED): Contains just enough functionality to talk to the parent node (either the Coordinator or a Router); it cannot relay data from other devices. This relationship allows the node to be asleep a significant amount of the time thereby giving long battery life. A ZED requires the least amount of memory, and therefore can be less expensive to manufacture than a ZR or ZC.
ZigBee End devices works as reduced function devices (RFD) as they just have the functionality to talk to their immediate nodes or parent nodes and a PAN coordinator or a Zigbee Router can work as Full function devices (FFD) they can communicate to any number of nodes.
The IEEE 802.15.4 MAC has two modes of operation:
・ Asynchronous (beaconless) mode.
・ Synchronous (beacon-enabled) mode.
In asynchronous beaconless mode, the node needs to listen to other nodes transmission all the time which drains the power of battery faster. In synchronous beacon-enabled mode, the transmission of periodic beacons packets between transmitter and receiver provides synchronization between the nodes.
2.2. Network Topology
The IEEE 802.15.4 adopts two network topologies: star topology and peer-to-peer topology as shown in Figure 2.
In star topology, there is communication established between a single central controller, called the PAN coordinator and the RFD devices and/or ZigBee Routers. Whereas, peer-to-peer topology allows more complex to-
Figure 2. Network topologies supported by ZigBee devices.
pologies such as mesh and cluster tree. RFDs can communicate only with FFDs while FFDs can communicate with other FFDs using multihop communication. Therefore, this topology allows the more complex networks.
2.3. Superframe Format
IEEE 802.15.4 defines a Superframe format as shown in Figure 3. This Superframe structure is divided into active and inactive periods. The active period divided into 16 equally spaced slots in which first slot is used for transmission of beacon and is further divided into Contention Access Period (CAP) and Contention Free Period (CFP). Guaranteed Time Slot (GTS) mechanism is used for contention free period. In the inactive period, the device goes to sleep mode to conserve energy.
In beacon enabled mode of IEEE 802.15.4, communication and synchronization is established by PAN coordinator. PAN coordinator transmits a beacons packet periodically which contains information such as PAN identification, synchronization and Superframe structure. The Superframe structure is determined by coordinators using Superframe Order (SO) and Beacon Order (BO). The active period of the superframe structure is called Superframe Duration (SD) which is divided into 16 equally sized time slots and Beacon Interval (BI) defines the time between two consecutive beacon frames which is determined by the Beacon Order (BO).
where; for a beacon enabled network.
Duty Cycle: the duty cycle of an IEEE 802.15.4 based network can be estimated as the ratio of active period to the entire superframe duration (SD) which is given by the following Equation (3).
Each device will be active for 2-(BO-SO) portion of the time, and sleep for 1-2-(BO-SO) portion of the time. For 250 Kbps, 2.4 GHz frequency band, a base superframe duration = 15.36 ms to 251.3 s corresponding to SO = 0 to 14. Where a base superframe duration = 960 symbols when SO = 0. In a PAN, the value of SO must be less than or equal to the BO. For non beacon enabled mode BO = SO = 15. In this case, a coordinator shall not transmit beacons and GTS shall not be permitted. BO = SO means there is no inactive part of the superframe or full duty cycle.
Figure 3. Frame format of superframe in IEEE 802.15.4.
3. Literature Survey
In this section, the related work based on the energy consumption and QoS of cluster and grid network for wireless sensor networks have been reviewed. W. Koubaa Ding et al. in  proposed a time based scheduling mechanism for ZigBee cluster tree WSN. F. Othman et al. and R. Bhadoria et al. in   investigated that energy conservation can be achieved by balancing the network load in WSN. K. Shuaib et al., and S. C. Ergen et al., in   analyzed the network lifetime for WSN. Y. K. Huang et al. in  investigated on the beacon enabled mode for low power transmission in IEEE 802.15.4 based WSN. Zheng et al.  have developed a NS-2 simulation for IEEE 802.15.4 standard and considered its various characteristics by performing different sets of simulations in beacon and non beacon enabled mode. Also, Lu et al.,  provided the performance evaluation of IEEE 802.15.4 MAC in the NS-2 network simulator in beacon enabled mode for a star topology and defined throughput energy delay tradeoff. Woon et al.  discussed the performance of peer-to-peer networks on a small scale basis using NS2 simulator and analyzed metrics such as throughput, packet delivery ratio, and average delay. Fengshu et al.  proposed C based simulation model for IEEE 802.15.4 beacon enabled mode under different BO and SO in order to minimize the total energy consumed in the network.
The adhoc on demand distance vector (AODV) routing protocol is an on-demand routing protocol as all routes are discovered only when needed and are maintained as long as they are being used  . AODV has multicasting and unicasting routing protocol property within a uniform framework. Source node, destination node and next hops are addressed using IP addressing. AODV floods the route request (RREQ) packets in the entire network and receiving route reply (RREP) to find the available routes. To determine the updated routing information and to prevent routing loops, AODV uses sequence numbers maintained at each destination as shown in the algorithm given in Figure 4. Sequence number for both destination and source are used. The route reply (RREP) message is unicasted back to the source that sent the message RREQ. The route error (RERR) message is sent to notify other nodes of the network about the loss of the link. HELLO messages are used to detect the neighboring nodes of the network.
4. Simulation Model
The performance of cluster and grid based network is evaluated by QualNet v6.1 Network Simulator  . In these scenarios similar parameters are used to evaluate the performance and energy consumption of nodes in both network scenarios.
Figure 4. AODV routing algorithm for handling RREQ messages.
In Figure 5, the proposed Star (cluster) based network scenario in which the sensor nodes are distributed in the area of dimension 100 m × 100 m. In this network 16 sensor nodes based on IEEE 802.15.4 PHY standard are considered in which four sensor nodes are FFD (full functional devices) coordinator i.e. nodes 6, 8, 14 and 16, one sensor node is PAN coordinator i.e. node 1 and the remaining 11 nodes are RFDs (reduced functional devices). PAN coordinator is placed at the centre of the simulation network area and act as the main powered device. The Beacon Order (BO) used is 3 and Superframe Order (SO) is 2. AODV  routing protocol is used in this network. Here, LINEAR battery model and GENERIC energy model is used.
In Figure 6 below, the proposed grid based network scenario in which the sensor nodes are distributed in the area of dimension 100 m × 100 m. This network consists of sixteen sensor nodes in which two sensor nodes are FFD (full functional devices) coordinator i.e. node number 12 and 15, one sensor node is PAN coordinator i.e. node number 16 and the remaining nodes are RFD (reduced functional devices).
Figure 5. Proposed star based network model.
Figure 6. Proposed grid based network model.
The simulation parameters are mentioned in Table 1. All sensor nodes are connected by using CBR (Constant Bit Rate).
5. Simulation Results
This section presents the simulation results of various performance metrics for QoS like Total Packets Received, Throughput, Average End-to-End Delay and Average Jitter. The Total Energy Consumption in mWh for both Star and Grid Topology is also evaluated and a conclusion derived from the comparative study is discussed in Section 6.
5.1. Total Messages Received
Total messages received are defined as the total number of data packets received at the sink node. The total number of packets is observed at the end of the simulation for different network load or data rate in pps. Figure 7 shows the variation of the total no. of packets received by the Sink Node at the end of the simulation for different value of load in pps. The average packets received for the Cluster and Grid Networks is 378.33 packets and 265 packets respectively.
Throughput is defined as the ratio of the number of total packets successfully delivered to individual destination
Table 1. Simulation parameters.
Figure 7. Total messages received (messages) in star and grid network topology.
nodes over total time  . It is generally measured in bits/sec. Figure 8 shows the variation of throughput for different values of Network Loads in pps. It can be realized that throughput of AODV protocol is higher when the data rate is 1 pps and decreases gradually for higher data rates. However the average Throughput for Cluster and Grid Network Topology is 433.33 kbps and 309.33 kbps.
5.3. Average End-to-End Delay
Average End-to-End delay refers to the time taken for a packet to travel from source to destination. It is the average delay suffered by all the packets in the network.
Figure 9 shows the performance of average end to end delay for different values of Network Load. The average end to end delay for star network topology and peer-to-peer network is 0.48 sec and 0.775 sec respectively.
5.4. Average Jitter
Average Jitter measures the variation time in the arrival of packets even if they are sent at the same time. These delays may be due to the network congestion, route discovery, queuing, propagation and transmit time. Jitter should be low for better performance of the network.
Figure 10 shows the average jitter delay for different values of Network Load. The average jitter for star network topology and peer-to-peer network is 0.596 sec and 1.041 sec respectively.
5.5. Total Energy Consumption
It is defined as the amount of energy consumed by each IEEE 802.15.4/ZigBee sensor nodes during transmission, reception, idle and sleep mode. The unit of energy consumption used in simulation is mWh.
Figure 11 shows the Energy Consumption by all nodes for different Data Rates. While calculating the total energy consumption the average energy consumption for Star/Cluster Network came out to be 2.657 mWh and the average energy consumption for Grid Network came out to be 2.117 mWh.
Figure 8. Throughput in (k bits/sec) for star and grid network topology.
Figure 9. Average end to end delay (in secs) for star and grid network topology.
Figure 10. Average jitter (in secs) for star and grid network topology.
Figure 11. Energy consumption by nodes in receive mode for star and grid network topology.
In this paper two analytical models in which the nodes are organized as cluster (star) and grid (peer-to-peer) based networks are analysed in beacon-enabled mode to calculate the energy consumption and QoS using QualNet v6.1 Simulator. It was investigated from the successive simulations for different Network Loads that when the packet transmission interval or packets per second (pps) increases then the network throughput decreases and the average end-to-end delay increases in both star and grid based network situations. It is also to be noted that QoS in cluster network is better than the QoS in Grid Connected Network while the Total Energy Consumption is better in case of Grid Connected Network than in Cluster Network. This is due to minimal link cost in peer-to-peer network model considered for Grid Network.