Wireless systems such as Wireless Sensor Networks (WSNs) are heavily utilized, for example, in industry, agriculture, forestry, and home automation. A WSN comprises several resource-constrained, tiny sensing devices - the sensor nodes. One of the most important properties of a WSN is the energy consumption, as in many applications the battery-powered nodes should achieve lifetimes of several years.
Especially the timing of the firmware and hardware components has a major impact on the consumed energy. Evaluation of WSNs is a challenging task and simulation has shown to be the most cost-effective approach which delivers reliable, repeatable, and scalable results. Based on the discussion of related work, I argue that there is a gap in state-of-the-art WSN simulators which enable either scalable or accurate simulation. I further propose a new simulation methodology to close the gap, thus enabling scalable and accurate simulation of the timing and energy consumption of WSNs. In addition, I claim that ignoring firmware runtimes as proposed by some simulators results in erroneous energy consumption predictions, thus making simulation less meaningful. The third derived hypothesis is, that using nowadays duty-cycle MAC protocols, the energy consumption ratio between a node's microcontroller and radio transceiver has shifted towards the microcontroller which can no longer be neglected. To validate the proposed hypotheses a research method is used which is based on a qualitative and quantitative discussion. The qualitative discussion proposes a general simulation methodology which considers a WSN at the network and node level, thus a hardware/software/network co-simulation is established. For every domain novel paradigms were developed to establish an accurate yet scalable simulation. For example, firmware source code is annotated with time information extracted of the binary built targeting the microcontroller and is natively executed on the CPU where the simulation is run.
Annotation occurs only at so-called Extended Basic Blocks (EBBs), thus ensuring fast simulations. The developed Dynamic Time Accumulation (DTA) concept further speeds simulation up as during runtime several EBBs are summarized into greater units. Hardware is modeled using the concepts of a hardware description language such as PAWiS. Further, the concept of Transaction Level Modeling (TLM) is used where bus communications present in a node are implemented as single transactions. Realistic channel models are included into simulation by integrating PAWiS with the well-established MiXiM framework.
The quantitative discussion is based on experiments and measurements conducted with STEAM-Sim which is a concrete implementation of the proposed methodology. STEAM-Sim achieves a timing accuracy of 98.3% compared to hardware measurements using complex firmware. As STEAM-Sim enables heterogeneous simulations, I evaluated a proprietary TDMA protocol and duty-cycle MAC protocols based on the Contiki operating system. Comparisons with the COOJA/MSPSim simulator reveal that STEAM-Sim provides a competitive scalability given a thousand times higher time resolution. The generated detailed energy profiles from STEAM-Sim allow to compare the duty-cycle protocols. STEAM-Sim was further used to evaluate the consequences of ignoring firmware runtimes.
Results show that the mismatch between simulated and measured energy consumption is up to several hundred percent. Investigations of the consumed energy of a node reveals, that the ratio between the energy consumption of a node's radio transceiver and microcontroller has decreased from 9.6 to 2.5 comparing the older X-MAC with the newer ContikiMAC duty-cycle protocol. Hence, the energy consumption of the microcontroller has to be considered in simulation of modern WSNs.