🔬 Zigbee Virtual Laboratory

Interactive Learning Platform for IEEE 802.15.4 and Zigbee Protocol

🎯 Learning Objectives

📚 Theoretical Background

1. Zigbee Protocol Stack

Zigbee is built on the IEEE 802.15.4 standard, which defines the Physical (PHY) and Medium Access Control (MAC) layers. The Zigbee Alliance specifies the upper layers including Network (NWK), Application Support (APS), and Application Framework (AF) layers [^11^].


Key Characteristics:

  • Operating frequency: 2.4 GHz (global), 915 MHz (Americas), 868 MHz (Europe)
  • Data rate: 250 kbps (2.4 GHz), 40 kbps (915 MHz), 20 kbps (868 MHz)
  • Range: 10-100 meters depending on environment
  • Supports up to 65,536 nodes in a network

2. Network Topologies

Zigbee supports three network topologies [^1^]:


Star Topology: Single coordinator with end devices. All communication goes through the coordinator. Simple but single point of failure.


Tree (Cluster-Tree) Topology: Hierarchical structure with coordinator, routers, and end devices. Routers extend coverage but parent node failure isolates children.


Mesh Topology: Peer-to-peer connections with self-healing capability. Routers can communicate directly with each other, providing multiple paths and fault tolerance [^21^].

3. Device Types

  • Zigbee Coordinator (ZC): Initiates and maintains the network, acts as Trust Center, stores security keys. Only one per network.
  • Zigbee Router (ZR): Extends network coverage, routes messages, can have child devices. Always has radio on.
  • Zigbee End Device (ZED): Reduced functionality, communicates only with parent, can sleep to save power.

4. CSMA-CA Mechanism

IEEE 802.15.4 uses Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA) for channel access [^12^]:


Unslotted CSMA-CA (Non-beacon mode): Used when beacons are not transmitted. Device performs random backoff, then clear channel assessment (CCA).


Slotted CSMA-CA (Beacon-enabled mode): Synchronized to superframe slots. Device waits for slot boundary, performs random backoff in units of backoff periods (20 symbols each), then performs two CCAs before transmission [^13^].

5. Superframe Structure

In beacon-enabled mode, communication is organized in superframes bounded by beacon transmissions [^16^]:


  • Beacon: Transmitted by coordinator at start of superframe
  • CAP (Contention Access Period): Accessed using slotted CSMA-CA
  • CFP (Contention Free Period): Contains Guaranteed Time Slots (GTS) for low-latency applications
  • Inactive Period: Devices can sleep to save power

Superframe duration controlled by Beacon Order (BO) and Superframe Order (SO) where 0 ≤ SO ≤ BO ≤ 14 [^13^].

Simulation 1: Zigbee Protocol Stack Explorer

Application Framework (AF)
Application objects, profiles, clusters
Application Support Sublayer (APS)
Binding, end-to-end ACK, security
Zigbee Device Object (ZDO)
Device management, discovery, security
Network Layer (NWK)
Routing, addressing, network management
MAC Layer (IEEE 802.15.4)
CSMA-CA, ACK, beacon management
Physical Layer (PHY)
2.4 GHz/915/868 MHz, O-QPSK modulation

Layer Information

Hover over or click a layer to see detailed information. Click "Animate Data Flow" to visualize packet transmission through the stack.

Simulation 2: Network Topology Visualizer

8
Coordinator (ZC)
Router (ZR)
End Device (ZED)
Data Packet

Topology Analysis

Star topology: All devices communicate through the central coordinator. Simple but vulnerable to coordinator failure.

Simulation 3: CSMA-CA Channel Access Mechanism

3

CSMA-CA Status

Idle - Ready to start simulation

NB = Number of Backoffs, CW = Contention Window, BE = Backoff Exponent

Simulation 4: Superframe Structure

4
3
2
Beacon
CAP (CSMA-CA)
GTS (Guaranteed)
Inactive

Superframe Parameters

Beacon Interval (BI): 245.76 ms

Superframe Duration (SD): 122.88 ms

Duty Cycle: 50%

📝 Laboratory Procedure

  1. Protocol Stack Analysis

    Study the Zigbee protocol stack architecture. Identify which layers belong to IEEE 802.15.4 and which are defined by Zigbee Alliance. Trace the path of a data packet from application layer to physical layer and back.

  2. Topology Comparison

    Simulate Star, Tree, and Mesh topologies with varying numbers of nodes. Observe the connectivity patterns and identify single points of failure. Record the number of hops required for different source-destination pairs.

  3. CSMA-CA Mechanism Study

    Run the CSMA-CA simulation in both slotted and unslotted modes. Observe the backoff procedure, clear channel assessment (CCA), and collision avoidance. Vary the number of competing devices and measure the channel access delay.

  4. Superframe Configuration

    Configure different superframe parameters (BO, SO) and observe the effects on beacon interval, active period duration, and duty cycle. Analyze the trade-off between latency (GTS allocation) and energy efficiency (inactive period).

  5. Performance Analysis

    Calculate the following metrics for each topology:
    • Network diameter (maximum hops)
    • Redundancy (alternative paths)
    • Power consumption characteristics
    • Scalability limitations

📋 Report Writing Guidelines

Your laboratory report should include the following sections:

Evaluation Criteria