Open NetSim, Select Examples->IOT-WSN->Wireless Sensor Networks->Beacon Time Analysis then click on the tile in the middle panel to load the example as shown in Figure 4‑35.
Figure 4‑35: List of scenarios for the example of Beacon Time Analysis
The following network diagram illustrates, what the NetSim UI displays when you open the example configuration file.
Figure 4‑36: Network set up for studying the Beacon Time Analysis
Settings done in sample config file
-
The following Environment properties are already set, as Manually Via Click and Drop.
-
In SinkNode->INTERFACE_1(Zigbee)> Datalink Layer enable Beacon mode set Superframe Order (SO) -> 10 and Beacon Order (BO) -> 12
Figure 4‑37: Datalink layer Properties window for Sink node
-
In Adhoc Link Properties change Channel characteristics-> Path Loss only, Path Loss Model -> Log Distance and path loss exponent ->2.
-
Generate SENSOR_APP Traffic Between Wireless_Sensor_1 to WSN_Sink_3 and set the transport layer protocol as UDP and other properties are default.
-
Enable Packet Trace and Plots.
-
Set Simulation time as 200 sec.
Theoretical Beacon Time Calculation
-
Beacon Interval (BI)= Super Frame duration (Active Period) + > Inactive Period (IP).
-
BI = abasesuperframe duration*2 ^BO = 15.36ms * 2^12 = 62914.56ms > \~ 62s.
-
SD = abasesuperframe duration*2 ^SO = 15.36ms * 2^10 = 15728.64ms.
-
To find Inactive period, IP = BI – SD = 62914.56ms - 15728.64ms = > 47185.92ms.
-
Super Frame duration is divided into 16 slots (1st slot > is allocated for beacon frame).
-
Each slot time = 15728.64ms / 16 = 983.04ms
NetSim Results:
-
Open packet trace and filter CONTROL_PACKET_TYPE to > Zigbee_BEACON_FRAME, users should get four zigbee_beacon_frames at > 0, 62.9, 125.8, 188.7 secs (approx.) for each Sensor_Node, because > the time interval between two beacons frames is 62 seconds. Since > we have 2 nodes so user can get 4 beacon frames for each node.
-
4 beacons were transmitted, so beacon time = 983.04ms * 4 = > 3932.16millisec (since 1 beacon = 1 time slot). Check the beacon > time in IEEE 802.15.4 metrics window.