Overview
This paper presents a modular energy framework for the Network Simulator 3 (ns-3), addressing a significant gap in wireless network research. By standardizing models for energy sources (e.g., batteries) and consumers (e.g., WiFi radios), the framework enables researchers to accurately simulate the impact of energy-aware protocols on device longevity.
Introduction
In wireless sensor networks and mobile computing, energy is a finite and critical resource. Historically, ns-3 lacked a native mechanism to track energy consumption or model battery depletion. Researchers often relied on ad-hoc, linear models that failed to capture complex chemical behaviors like the Rate Capacity Effect (where high current draws disproportionately reduce capacity) or the Recovery Effect (where rest periods allow for partial capacity recovery). This framework provides a unified, extensible solution to these challenges.
Framework Architecture
The authors designed a modular architecture centered on two primary components:
- EnergySource: Represents the power supply, tracking remaining energy and notifying devices upon depletion.
- DeviceEnergyModel: Represents power-consuming components, such as WiFi radios, using state-based current draw (e.g., transmitting, receiving, or idling).
This separation allows researchers to swap battery types or hardware models independently, facilitating comparative studies.
Non-Linear Battery Modeling and Efficient Sampling
To move beyond simplistic linear models, the framework implements the Rakhmatov-Vrudhula (R-V) model. A key innovation is the Transition and Periodic Based Algorithm. Traditional periodic sampling often misses brief, high-energy state transitions, such as short packet bursts, unless the sampling frequency is prohibitively high.
The proposed algorithm triggers an energy update every time a device changes state. This ensures that even the shortest bursts of activity are accurately accounted for without the computational overhead of high-frequency periodic sampling.
Validation and Performance
The R-V battery model implementation was validated against established benchmarks, showing high accuracy across 22 different load profiles. To demonstrate practical utility, the authors simulated an energy-aware version of the Optimized Link State Routing (OLSR) protocol on a 7x7 grid of nodes.
The results showed that by tying a node's "willingness" to relay traffic to its current battery level, the network could redistribute traffic away from dying nodes. In one scenario, a critical relay node that failed at 1164.8 seconds under standard OLSR was able to extend its life and maintain network connectivity significantly longer by "opting out" of relaying as its energy depleted.
Conclusion and Future Work
While the framework currently focuses on network-related energy events, future work includes developing models for CPU-intensive tasks and integrating energy scavenging (e.g., solar or thermal) to model self-sustaining networks. Further validation against physical hardware remains a priority to refine the accuracy of these simulation models.
Summary updated