802.15.4 SuperFrame Structure

Study the 802.15.4 Superframe Structure and analyze the effect of Superframe order on throughput

## Introduction#

A coordinator in a PAN can optionally bound its channel time using a Superframe structure which is bound by beacon frames and can have an active portion and an inactive portion. The coordinator enters a low-power (sleep) mode during the inactive portion.

The structure of this Superframe is described by the values of macBeaconOrder and macSuperframeOrder. The MAC PIB attribute macBeaconOrder, describes the interval at which the coordinator shall transmit its beacon frames. The value of macBeaconOrder, BO, and the beacon interval, BI, are related as follows:

For 0 ≤ BO ≤ 14, BI = aBaseSuperframeDuration * 2^BO^ symbols.

If BO = 15, the coordinator shall not transmit beacon frames except when requested to do so, such as on receipt of a beacon request command. The value of macSuperframeOrder, SO shall be ignored if BO = 15.

An example of a Superframe structure is shown in following Figure 24‑1.

Figure 24‑1: An example of the Super Frame structure

Theoretical Analysis

From the above Superframe structure,

$$SuperFrame\ Duration\ = \ aBaseSuperframeDuration*2^{BO}$$

$$Active\ part\ of\ SuperFrame\ = \ aBaseSuperframeDuration*2^{SO}$$

$$Inactive\ part\ of\ SuperFrame\ = \ aBaseSuperframeDuration*{(2}^{BO} - 2^{SO})$$

If Superframe Order (SO) is same as Beacon Order (BO) then there will be no inactive period and the entire Superframe can be used for packet transmissions.

If BO=10, SO=9 half of the Superframe is inactive and so only half of Superframe duration is available for packet transmission. If BO=10, SO=8 then (3/4)^th^ of the Superframe is inactive and so nodes have only (1/4)^th^ of the Superframe time for transmitting packets and so we expect throughput to approximately drop by half of the throughput obtained when SO=9.

Percentage of inactive and active periods in Superframe for different Superframe Orders is given below Table 24‑1. This can be understood from Beacon Time Analysis section of the IoT-WSN technology library manual.

Beacon Order (BO) Super Frame Order (SO) Active part of Superframe(%) Inactive part of Superframe (%) Throughput estimated (%)
10 10 100 0 > 200% of T
10 9 50 50 Say T = 21.07(Got from simulation)
10 8 25 75 50 % T
10 7 12.5 87.5 25 % T
10 6 6.25 93.75 12.5 % of T
10 5 3.125 96.875 6.25 % of T
10 4 1.5625 98.4375 3.12% of T
10 3 0.78125 99.21875 1.56 % of T

Table 24‑1: Inactive and active periods in Superframe for different Superframe

We expect throughput to vary in the active part of the Superframe as sensors can transmit a packet only in the active portion.

## Network Setup#

Open NetSim and click on Experiments> IOT-WSN> 802.15.4 Superframe and effect of Superframe order on throughput then click on the tile in the middle panel to load the example as shown in below Figure 24‑2.

Figure 24‑2: List of scenarios for the example of 802.15.4 Superframe and effect of Superframe order on throughput

Super Frame Order 10 Sample

NetSim UI displays the configuration file corresponding to this experiment as shown below Figure 24‑3.

Figure 24‑3: Network set up for studying the Super Frame Order 10 Sample

## Procedure#

The following set of procedures were done to generate this sample:

Step 1: A network scenario is designed in NetSim GUI comprising of 2 Wireless Sensors and a WSN Sink in the "Wireless Sensor Networks" Network Library.

Step 2: Before we actually designed this network, in the Fast Config Window containing inputs for Grid Settings and Sensor Placement, the Grid Length and Side Length were set to 500 and 250 meters respectively, instead of the default 50 and 50 meters and we have chosen Manually Via Click and Drop option.

The Ad hoc link properties is set to NO PATHLOSS for the channel characteristics.

Step 4: In the Interface Zigbee > Data Link Layer of WSN Sink, Beacon Mode is set to Enable, and Beacon Order and Super Frame Order is set to 10 respectively.

Step 5: Right click on the Application Flow App1 CUSTOM and select Properties or click on the Application icon present in the top ribbon/toolbar.

A CUSTOM Application is generated from Wireless Sensor 1 i.e., Source to Wireless Sensor 2 i.e. Destination with Packet Size set to 25 Bytes and Inter Arrival Time set to 3000 µs.

The Packet Size and Inter Arrival Time parameters are set such that the Generation Rate equals 67 Kbps. Generation Rate can be calculated using the formula:

$$Generation\ Rate\ (Mbps)\ = \ Packet\ Size\ (Bytes)\ *\ 8/Interarrival\ time\ (µs)$$

Step 6: Enable plots and run the Simulation for 30 Seconds and note down the Throughput value.

Similarly, run the other samples by varying the Super Frame Order to 9, 8, 7, 6, 5, and 4 and note down the throughput values.

## Output#

The following are the throughputs obtained from the simulation for different Super Frame Orders Table 24‑2.

Super Frame Order Throughput (Kbps)
10 41.68
9 21.07
8 10.5
7 5.25
6 2.63
5 1.30
4 0.62

Table 24‑2: Different Super Frame Orders vs. throughputs

To obtain throughput from simulation, payload transmitted values will be obtained from Link metrics and calculated using following formula:

$$Application\ Throughput(in\ Mbps) = \frac{Total\ payload\ delivered\ to\ destination\ (bytes)\ *\ 8}{Simulation\ Time(Millisecond)\ - App\ Start\ Time(Millisecond)}$$

Figure 24‑4: Plot of Super Frame Order with Simulated Throughput vs. theoretical analysis

Comparison Chart: All the above plots highly depend upon the placement of Sensor in the simulation environment. So, note that even if the placement is slightly different the same set of values will not be got but one would notice a similar trend.

## Inference#

From the comparison chart both the simulation and theoretical throughputs match except for the case with no inactive period. A sensor will be idle if the last packet in its queue is transmitted. If a packet is generated in inactive period, then the packet has to wait in the queue till the next Superframe so sensor has packets waiting in its queue and so it cannot be idle in the next Superframe, but if there is no inactive period then there might be no packets waiting in the queue and so sensor can be idle resulting in lesser throughput.