Enhanced Simulation Model of ZigBee Wireless Sensor Network

Download (1)

Full text

(1)

2017 International Conference on Computer, Electronics and Communication Engineering (CECE 2017) ISBN: 978-1-60595-476-9

 

Enhanced Simulation Model of ZigBee Wireless Sensor Network

Lei SHI, Hao-li REN and Mei-ping PENG

Equipment Academy, No.1, Bayi Road, Huairou District, Beijing, China

Keywords: Network model, ZigBee protocol, Network simulation, Wireless sensor network.

Abstract. Based on the architecture of ZigBee wireless sensor network (WSN) and the hierarchical modeling mechanism of OPENT, an enhanced ZigBee simulation model was studied to improve the MAC layer process model of IEEE 802.15.4 protocol provided by OPNET. The ZigBee Protocol-compatible network layer protocol, the routing algorithm, and the network layer process model based on an embedded routing function of OPNET were designed, which enhanced the scalability of ZigBee simulation system. And the enhanced ZigBee model optimized the number of router nodes needed for nodes access network, network control overheads, and end-to-end delay under different network scales.

Introduction

OPNET has been used to design tree self-organizing multi-hop network model based on IEEE 802.15.4 protocol, and the network formation time, data frame transmission performance, throughput, failure and recovery of equipment are simulated [1]. The medium access control (MAC) layer was optimized and designed, and the performance of a sensor network was analyzed for the MAC layer of different competition mechanisms [2,3]. The ZigBee network simulation system based on OPNET adopted ZigBee models of OPNET [4,5], which had disadvantages of difficulty in modeling, overhead, network delay, poor scalability, unguaranteed network access to all nodes, authenticity of communication radius, and other issues [6]. It is difficult to be applied in practical application areas which have high performance requirements, such as high reliability and less network delay. In addition, failures and recoveries of nodes cannot be simulated according to needs of tests, when performing a large-scale sensor network test by using ZigBee models of OPNET. When interval of frame-generating is small, and length of information has large increase, some nodes will appear continuous automatic failures or abnormal simulation.

Therefore, an enhanced process model of ZigBee WSN layer was established based on OPNET, including node access method and mixed routing strategy. Its performance was improved for the above defects, and simulation of ZigBee WSN based on OPNET was achieved.

Network Layer Process Model

The MAC layer and the physical (PHY) layer adopt the process model that belongs to OPNET. The application layer adopts simple data to generate a process model. The network layer accepts data that transfer between the MAC layer and application layer that adjacent to the network layer, and realizes network management and nodes access function. The enhanced ZigBee WSN simulation model mainly implements the network layer process model.

Modeling procedure of network layer process model based on OPNET includes three stages: process decomposition, event enumeration, and state response diagram. Firstly, the ZigBee network layer process model is described in a single process. Secondly, all the logical events that may call the process are enumerated, and the responses of process model to various events are determined. A state transition of ZigBee network layer is represented by the event response table, including probable state actions of each state, transition conditions, and end conditions. Finally, a state transition diagram and its status codes are developed to achieve the process model.

Event Enumeration of Network Layer Process Model

(2)

Table 1. Events and interrupt types of ZigBee network layer process model.

Events Event Descriptions Interrupt Types Frames arrive High-level data frames arrive. Flow interrupt Frames arrive Low-level data frames arrive. Flow interrupt

Channels scan Each device performs channels scanning while joining the network. Event interrupt and remote interrupt Establish a network and join the

network The coordinator builds a network and all other devices join the network. Event interrupt and remote interrupt To select routes. Can not find the destination address in the routing table, then begin routing. Self-interrupt

Node failure or recovery Nodes stop working or recovering. Self-interrupt

Event Response Table of Network Layer Process Model

The state transition of ZigBee network layer process are explained through event response table of network layer process model, as shown in Table 2.

Table 2. Event response of network layer process model.

State Event Transition Conditions State Actions End Conditions

init

Process starts No condition No action init Self-interrupt Coordinators No action scan Self-interrupt Routers or end devices No action scan1

Scan or scan1

Remote interrupt

The network layer start remote interrupt to call MAC layer for channels scanning.

To pass network addresses assigned by OMS.

MAC layer: scanning

Remote interrupt

The MAC layer start remote interrupt to call network layer for informing the scan achieved.

To select an appropriate channel to establish a network or to select an appropriate parent node to join the network.

Coordinator: setnetwork; Other devices: join

join

Frames arrive To receive data frames from MAC layer.

To receive response of join, and to determine parent nodes, channels and other parameters.

join

Self-interrupt To join the network successfully. No action active

active Frames arrive To receive data frames from high-level and low-level. To check whether the routing table has a route of destination address, and to process low-level frames.

Path: active; NO path: route. route Self-interrupt To create a path or fail. To send data frames or route error. active

Function Implementation of Network Simulation Model Device Access Method of Cluster Probability

Firstly, coordinators, routers, and end devices access the network based on cluster in following order: Coordinator>Router>End devices. And then according to size of the network, it is determined that the maximum number of routers (Rmax) and the maximum number of end devices (Emax) which can be accepted to access the network by a single coordinator or router which is waiting for accessing the network. According to the level of cluster, devices access the network in turn to reduce network congestion caused by devices accessing network at the same time, and to improve the efficiency.

Design and Implementation of Network Node Access Function

After deploying network nodes, all nodes enter into a procedure of network initialization. Accessing to the state response diagram and the event response table, network function of the coordinator is implemented by following steps.

(3)

Step 3: After entering the state of “active”, the request beacon frame and the join request are waiting for processing to complete the nodes accessing network.

The network function of the router and end device is implemented by following steps.

Step 1: The MAC layer is called to scan channels after network initialization. Then it enters the state of “scan1”. A remote interrupt is called by the MAC layer. A request frame of beacon is sent out, and a timer of waiting beacon frame is set. Then it enters the waiting beacon frame state of “wait”. Step 2: The adjacent nodes which have already entered the network reply to beacon frames after receiving request beacon frames. During the time of the waiting beacon frame timer, the nodes which waiting for entering the network receive and record beacon frames, otherwise the neighbor table is released to rescan channels.

Step 3: The MAC layer generates a remote interrupt to notify the network layer that the scan is completed, then the network layer establishes neighbor table information.

Step 4: According to neighbor table information, a router or a coordinator which has a minimum number of hops and allows receiving child nodes is selected from received beacon frames as a parent node, and the request frames of access network are sent. Then it enters the waiting access reply frame state of “join”.

Step 5: The potential parent node checks whether it has ability to continue receiving the child node, after receiving request frames of access network. If there is the ability, the address are assigned to that child node through the Tree address allocation mechanism, and an access reply is sent. If there is no ability, an access failure reply is sent.

Step 6: The access reply frame is received within a time of the timer. If it is valid, the parent node is set, the network is registered, and the waiting access reply timer is canceled. Then it enters the state of “active” to wait for processing data frames and other triggered events.

Step 7: When no transmission path is available, the route is set into the state of “route”. It is set into the state of “active”, after the route is established.

Step 8: If there is a timer timeout of waiting access reply frames, then the neighbor table is released, and it enters the state of “node_fail”. The MAC layer is called to scan channels again.

Design and Implementation of Route Function

The routing mechanism of ZigBee does not specify how to configure routing policies. According to characteristics of WSN data transmission, data are converged to the coordinator nodes, a hybrid routing policy using both Tree and AODVjr algorithm is proposed to ensure that the whole network is not needed to reconfigure after node fails [7]. Follow these steps to implement the routing function. Step 1: The end device send data frames directly to its parent node (router or coordinator) using Tree routing Algorithm.

Step 2: The parent node searches the routing table after receiving data frames, and selects the optimal path to transmit data frames according to the routing policy.

Step 3: If there is an optimal routing path in the routing table, then data are sent to the next hop of router.

Step 4: If there is no routing path in the routing table, the routing policy is enabled for initial route discovery. A routing path is established, and other nodes do not accept the data frame.

Step 5: The parent node decides to use which routing algorithm, according to its level of cluster. When the depth of router in the whole network topology Ddev>n, n= (1, 2, 3…), AODVjr routing

algorithm is used. When the depth Ddev<n, n= (1, 2, 3…), Tree routing algorithm is used.

(4)

Simulation Verification and Result Analysis

A ZigBee network layer process model with routing function was established by the enhanced ZigBee WSN simulation model (Abbreviated as the Enhanced Model). The function of data routing and node access network were achieved. Compared with the ZigBee model of OPNET(Abbreviated as the Original Model), the Enhanced Model has better performance, as shown in Table 3, which is more suitable for the further application of WSN.

Table 3. Performance comparison of the Enhanced Model and the Original Model.

The Original Model The Enhanced Model Network deployment costs High Low

Nodes access overhead High Low End-to-end network delay Relatively low Low Node failure probability High Low

Simulation background was designed based on a designed multi-hop WSN. Networks with different sizes were simulated, and nodes were distributed randomly in each scene. The transmission power was 0.001W, and the information length was 1024 bits. Data frames were generated and sent to the network layer in the interval of Poisson(20) by the application layer. The running time was 2 hours. Other main parameters are shown in Table 4.

Table 4. Simulation parameters.

Simulation Parameters Parameter Value Network size 100m×100m

Communication radius 30m Maximum number of child nodes

Maximum number of routers 7 5 Maximum depth 5 Routing depth 2.5

Comparison of Network Deployment Costs

Compared to the Original Model, the Enhanced Model needs a smaller number of router nodes to achieve that all the network nodes access the network, as shown in Table 5. Because the cost of routers is higher than end devices, and the Enhanced Model reduces the number of router nodes, so network deployment cost is effectively reduced and the system scalability is enhanced.

Nodes Access Overhead

The Enhanced Model distinguishes the type of nodes before nodes accessing network, and then routers access network firstly. Sensors (means end devices) wait for a system simulation time to access network. That is, sensors access network after router accessing network, which effectively avoid a large number of nodes which access into a router node at the same time, and reduce the loss rate of frames in the process of accessing network and nodes access overhead, as shown in Figure 1.

Table 5. Numbers of routers required for nodes of different network sizes.

Number of Nodes Number of Routers Needed by the Original Model Number of Routers Needed by the Enhanced Model

20 6 2

40 13 5

60 19 10

80 25 16

(5)

Figure 1. Nodes access overhead in the process of accessing network.

The time of nodes accessing network required for the Enhanced Model is slightly longer than the time required for the Original Model, taking 80 nodes as an example shown in Figure 2. Most nodes of the Enhanced Model access the network earlier than the Original Model. Only a few nodes extend access time. So most of nodes can access network quickly using the Enhanced Model to facilitate nodes joining and exiting.

Figure 2. Time of all the nodes accessing network. End-to-end Delay

End-to-end delay describes the communication real-time of transmitting data frames from one to another, which indicates whether the network can be monitored in real-time. The Enhanced model adopts the improved hybrid routing strategy, and always adopts the optimal path to transmit the data in the process, which makes the index of end-to-end delay better than the Original Model, as shown in Figure 3.

0 2000 4000 6000 8000 10000 12000

1 2 3 4 5 6

ACK开销

bi

t)

网络规模(*10) 原Zigbee模型 改进的Zigbee模型

0 10 20 30 40 50 60 70 80 90

1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141 148 155 162

仿真时间(s)

(6)

Figure 3. End-to-end delay for different network sizes.

Conclusion

In this paper, the Enhanced Model was proposed for defects of the Original Model, combining with the network architecture of WSN and three-layer modeling mechanism of OPNET. The network layer process model was designed, and the ZigBee protocol was improved. The ZigBee WSN simulation based on OPNET and the function of routing and accessing network were achieved. Comparing with the simulation result, the Enhanced Model had more optimized simulation performance, and was more suitable for the practical application of WSN.

Reference

[1] Information on http://www.SciRP.org/journal/wsn, doi:10.4236/wsn.2012.43009.

[2] Jurčík P., et al. A simulation model for the IEEE-802.15.4 protocol: delay/throughout evaluation of the GTS Mechanism, IEEE Computer Society. (2007) 109-116.

[3] Villaverde B.C., et al. Experimental evaluation of beacon scheduling mechanism for multichip IEEE 802.15.4 wireless sensor network, IEEE Computer Society. (2010) 226-231.

[4] Pešovic, Uroš, Mohorko, Joze, Cucej, Zarko. Upgraded OPNE-ZB 802.15.4 simulation model, Serbia, Belgrade. (2009) 161-164.

[5] Marghescu C., Pantazica M, et al. Simulation of wireless sensor network using OPNET, IEEE Computer Society. (2011) 249-252.

[6] Hammoodi I.S., Stewart B.G., Kocian A., et al. A comprehensive performance study of OPNET modeler for ZigBee wireless sensor networks, IEEE Computer Society. (2009)357-362.

[7] Chakeres I.D., Klein-Berndt L. AODVjr, AODV Simplified. Mobile Computing and Communication Review. 6(2002) 100-101.

0 0.002 0.004 0.006 0.008 0.01 0.012 0.014

0 20 40 60 80 100 120

end-to

-en

d

dela

y(s

ec)

nodes

Figure

Table 1. Events and interrupt types of ZigBee network layer process model.

Table 1.

Events and interrupt types of ZigBee network layer process model. p.2
Table 2. Event response of network layer process model.

Table 2.

Event response of network layer process model. p.2
Table 4. Simulation parameters.

Table 4.

Simulation parameters. p.4
Figure 1. Nodes access overhead in the process of accessing network.

Figure 1.

Nodes access overhead in the process of accessing network. p.5
Figure 2. Time of all the nodes accessing network.

Figure 2.

Time of all the nodes accessing network. p.5
Figure 3. End-to-end delay for different network sizes.

Figure 3.

End-to-end delay for different network sizes. p.6

References