← All projects

Project · 2022 · completed · Research

Energy-aware wireless sensor network simulation

A desktop simulator for evaluating duty cycling and power-control strategies in wireless sensor networks.

Problem

Battery-powered wireless sensor nodes must remain connected to a sink while minimizing the energy spent listening, receiving, and transmitting. Keeping every radio active maximizes availability but shortens network lifetime. This undergraduate capstone models that tradeoff and compares normal operation with duty-cycled, power-controlled network behavior.

Approach

The simulator provides two topology-control variants, GECP and LMST, each with models for regular nodes, duty-cycled nodes, coordinated nodes, and the sink. Nodes execute as communicating threads, maintain neighbor and routing state, transition between active and sleep modes, and decrement their battery according to the performed radio operation. Experiments compare the remaining energy and topology evolution with and without duty cycling.

Technical implementation

NetworkX represents node positions and communication links, while explicit energy constants account for sleep, listening, transmission, and reception. The LMST implementation derives local minimum-spanning relationships and distinguishes reciprocal from unidirectional links. Matplotlib renders node battery levels, active and sleeping nodes, links, and energy-over-time curves inside a Tkinter desktop interface. Log files preserve protocol events and experiment results for later inspection.

if node.state == "sleeping":
    node.battery_level -= node.sleep_energy
else:
    node.battery_level -= node.listen_energy
    if packet_to_send:
        node.battery_level -= node.transmit_energy