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. NetSim provides the protocol source code 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 models how sensor data moves across the network, not the data itself. Sensors are abstract: each one represents any sensing or embedded device and sends measurement packets.

Abstract sensors

A single sensor model represents any sensor or embedded device that senses physical properties or random fields, such as temperature or pressure.

Data as IP packets

The sensors send data as IP packets, with a size and inter-arrival time that you set. You therefore 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 faces the sensors, and a WAN interface faces 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

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

Application

Sensor and standard traffic

A sensor application generates measurement packets. Standard NetSim applications such as Voice, Video and CBR can run at the same time.

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

NetSim tracks power use in the transmit, receive and idle states, and supports energy harvesting. You can then estimate battery drain and network lifetime.

Open

Protocol source in C

Each 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 in non-beacon mode.

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 gives 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. You can set the transmit power, receiver sensitivity and ED threshold.

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 finds 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 the packet delivery rate fall as the sensor-sink distance increases, with a log-distance path-loss model. Find the distance at which you need an intermediate router.

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

The results appear in a dashboard and plot window as soon as a run completes. The trace and log files give more detail.

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 used NetSim

These peer-reviewed IoT and wireless sensor network papers used NetSim to build and validate their models.

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

The development team is extending the library from short-range Zigbee to long-range, low-power wide-area networks.

In development

LoRaWAN support

A LoRaWAN model pairs the long-range LoRa PHY with the LoRaWAN MAC. It covers 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, which trade data rate against range and link budget. The model also includes 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 that report to a small number of gateways.