3rd International Workshop on OMNeT++

Research Article

Accurate clock models for simulating Wireless Sensor Networks

        author={Federico  Ferrari and Andreas  Meier and Lothar  Thiele},
        title={Accurate clock models for simulating Wireless Sensor Networks},
        proceedings={3rd International Workshop on OMNeT++},
        keywords={Sensor Networks Simulation Clock Drift Time Synchronization MAC Scheduling Timers OMNeT++ Castalia},
  • Federico Ferrari
    Andreas Meier
    Lothar Thiele
    Year: 2010
    Accurate clock models for simulating Wireless Sensor Networks
    DOI: 10.4108/ICST.SIMUTOOLS2010.8693
Federico Ferrari1,*, Andreas Meier1,*, Lothar Thiele1,*
  • 1: Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH), Zurich, Switzerland.
*Contact email: ferrari@tik.ee.ethz.ch, a.meier@tik.ee.ethz.ch, thiele@tik.ee.ethz.ch


Time-critical parts of Wireless Sensor Network (WSN) applications, like medium access (MAC) and synchronization protocols, require an accurate timing analysis of their behavior. Meaningful simulation results are only achieved when the simulator provides a realistic model of the node's hardware (HW) clock. This paper provides three main contributions: (1) a realistic clock-drift model that allows to simulate HW clocks with an accuracy error of less than 1 μsec, (2) a clear interface to schedule timers/events that abstracts the artificial simulation time from the user and ensures that the HW time is used when implementing applications, and (3) a clock translator that converts the HW time of a node to the simulation time when scheduling events (hidden from the user). We implement and validate these extensions in Castalia, a WSNs simulator based on the OMNeT++ platform. We show that they have only minimal effects on the memory and processing demands of the simulation.