Internet of Things & Wireless Sensor Networks

Sensors · Zigbee · 6LoWPAN · Mesh routing

NetSim models IoT as a wireless sensor network that connects to the wider internet through a 6LoWPAN gateway. Build large sensor deployments with the quick-placement utility, then simulate the full stack: IEEE 802.15.4 PHY and MAC, multi-hop routing, and per-node energy use. Protocol source code is provided in C.

Smart agriculture Industrial IoT Smart cities Academia and research
NetSim · IoT / WSN scenario
A typical IoT scenario in NetSim with a large wireless sensor network created using the quick placement utility

What NetSim models

NetSim focuses on how sensor data moves across the network rather than on the data itself. Sensors are abstract: each one represents any sensing or embedded device and emits measurement packets.

Abstract sensors

A single sensor model stands in for any sensor or embedded device, sensing physical properties or random fields such as temperature or pressure.

Data as IP packets

Sensed data is sent as IP packets with user-set size and inter-arrival time, so you control the offered load precisely.

6LoWPAN gateway

The WSN connects to an internetwork through a 6LoWPAN gateway with two interfaces: a Zigbee (802.15.4) radio toward the sensors and a WAN interface toward the internet.

Network-focused

NetSim simulates packet transport over the IoT network. It does not process the application payload or perform data storage and analytics on it.

The NetSim IoT / WSN stack

Every device runs a full protocol stack, so experiments map to real protocol behaviour from the application down to the radio.

Application

Sensor and standard traffic

A sensor application generates measurement packets, alongside standard NetSim applications such as Voice, Video, and CBR.

Transport

UDP

The transport layer carries the short, delay-tolerant messages typical of sensor reporting.

Network

Multi-hop routing

The AODV and RPL ad hoc routing protocols build multi-hop paths from sensors to the sink. Static IP routing is also supported.

MAC and PHY

IEEE 802.15.4 (Zigbee)

The MAC and PHY follow IEEE 802.15.4, with CSMA/CA access in both beacon-enabled and non-beacon modes.

Energy

Energy model

Power use is tracked across transmit, receive, and idle states, with energy-harvesting support, so you can estimate battery drain and network lifetime.

Open

Protocol source in C

Every layer ships with C source code. Modify the stack in Visual Studio to build custom protocols or new application models.

IEEE 802.15.4 at a glance

The standard defines a low-data-rate, low-power, short-range radio. NetSim models its PHY and MAC behaviour with configurable parameters.

PHY layer

The 2.4 GHz ISM band carries 16 channels of 2 MHz each. OQPSK with direct-sequence spread spectrum yields a raw bit rate of 250 kbps.

CSMA/CA access

Nodes contend with a random back-off, a clear channel assessment, and optional acknowledgements and retries. Access is slotted in beacon mode and unslotted otherwise.

Beacon and superframe

In beacon-enabled mode a superframe (beacon, contention access period, and contention free period) gives synchronised, low-duty-cycle operation. Non-beacon mode is simpler always-on access.

Configurable defaults

Symbol time 16 µs, slot time 320 µs, macMinBE 3, macMaxBE 5, macMaxCSMABackoffs 4, and max frame retries 3. Transmit power, receiver sensitivity, and ED threshold are all settable.

From sensor to server

Sensors generate measurement packets that queue in a packet buffer, then travel directly or over multiple hops across a wireless link to the gateway. The gateway forwards them over the internet to a server.

Wireless links support a range of propagation models, and ad hoc routing handles multi-hop paths. The MAC and PHY layer protocol is IEEE 802.15.4.

A typical IoT application scenario in NetSim: sensors generate packets that hop over a wireless link to a gateway, which forwards them via the internet to a server

What you can study

Worked experiments from the IoT and WSN manual, ready to load, run, and extend.

One-hop 802.15.4 throughput

Send back-to-back packets from a single sensor and compare the simulated saturation throughput (about 104.7 kbps) against the analytical CSMA/CA timing budget (about 105.4 kbps).

Multi-hop sensor-sink path

Watch packet delivery rate fall with sensor-sink distance under a log-distance path-loss model, and find the distance at which an intermediate router becomes necessary.

Star-topology network

Evaluate the performance of a star topology in which several sensors report to a single PAN coordinator.

Superframe order vs throughput

Vary the 802.15.4 superframe order in beacon-enabled mode and observe its effect on throughput.

Performance metrics and log files

Results land in a dashboard and plot window the moment a run completes, with deeper detail available in trace and log files.

The NetSim result dashboard and plot window shown after a simulation completes

The result dashboard and plot window shown in NetSim after a simulation completes.

Performance measures

  • End-to-end delay and jitter
  • Errors and collisions
  • Packets generated, received, collided
  • Route tables
  • TCP acks and retransmissions

Multi-level results

  • Per interface
  • Per device
  • Per application
  • Per link
  • Network-wide summary

Trace and logs

  • Per-packet trace files
  • Protocol log files
  • IEEE 802.15.4 radio measurements: path loss, shadow fading, Rx power, SNR, SINR, BER

Export and integration

  • CSV export for Excel
  • pcap capture for Wireshark
  • MATLAB and Python interfacing, offline or at run time

White paper

A worked study that validates NetSim against analysis for beaconless 802.15.4 sensor networks.

NetSim WSN and IoT white paper cover

Performance analysis of 802.15.4-based WSNs

  • Analysis of WSNs that rely on beaconless IEEE 802.15.4
  • Five cases covering single-hop and multi-hop sensor-to-base-station scenarios
  • Radio propagation calculations for transmission range and carrier sense range
  • Throughput versus source rate across sensors and configurations
Independent validation

Publications that have used NetSim

Peer-reviewed IoT and wireless sensor network research built and validated in NetSim.

Watch it in action

A webinar on IoT R&D with NetSim, machine-learning integration, and hardware interfacing.

Video Thumbnail

IoT R&D with NetSim (Webinar, Part 1)

Video Thumbnail

IoT R&D with NetSim (Webinar, Part 2)

Video Thumbnail

Machine Learning with IoT: ML Classifiers and Attack Detection

Video Thumbnail 4:28

Interfacing Raspberry Pi with NetSim

On the roadmap

Development is extending the library beyond short-range Zigbee to long-range, low-power wide-area networking.

In development

LoRaWAN support

A LoRaWAN model that pairs the long-range LoRa PHY with the LoRaWAN MAC, covering sub-GHz ISM operation and the star-of-stars topology in which end devices reach a network server through gateways.

Planned

Spreading factors and data rates

Chirp spread spectrum with selectable spreading factors, trading data rate against range and link budget, plus adaptive data rate behaviour.

Planned

Device classes and scale

Class A, B, and C end-device behaviour, with large-scale deployments of low-power devices reporting to a handful of gateways.