GreenCastalia: An Energy-Harvesting-Enabled Framework for the Castalia Simulator David Benedetti, Chiara Petrioli, Dora Spenza Computer Science Department University of Rome “La Sapienza” Via Salaria 113, 00198, Rome, Italy {benedetti,petrioli,spenza}@di.uniroma1.it ABSTRACT The emergence of energy-scavenging techniques for powering networks of embedded devices is raising the need for dedi- cated simulation frameworks that can support researchers and developers in the design and performance evaluation of harvesting-aware protocols and algorithms. In this work we present GreenCastalia, an open-source energy-harvest- ing simulation framework we have developed for the popu- lar Castalia simulator. GreenCastalia supports multi-source and multi-storage energy harvesting architectures, it is highly modular and easily customizable. In addition, it allows to simulate networks of embedded devices with heterogeneous harvesting capabilities. Categories and Subject Descriptors C.2.1 [Network Architecture and Design]: Network Ar- chitecture and Design—Wireless communication General Terms Design, Measurement, Performance Keywords Energy harvesting, Castalia, Network simulations, Wireless sensor networks 1. INTRODUCTION Energy harvesting is rapidly affirming as a promising so- lution towards the goal of energy-autonomous wireless sen- sor networks (WSNs). The practical feasibility of apply- ing energy-scavenging techniques to networks of embedded systems has been assessed by many works, proposing and validating prototype implementations of devices powered by solar light [28, 3], wind [24, 6], kinetic energy [22], thermal energy [29], RF energy [7], and so on. Such environmentally- powered systems have the potential for unlimited lifetime, but this ambitious goal is challenged by the unpredictable nature of environmental energy sources, which requires ded- icated solutions for energy management [1]. In fact, energy- Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Permissions@acm.org. ENSSys’13, November 13 2013, Roma, Italy Copyright 2013 ACM 978-1-4503-2432-8/13/11?$15.00. http://dx.doi.org/10.1145/2534208.2534215 harvesting nodes usually experience an alternation between periods in which energy must be sparely used and others in which there may even be an excess of energy available. Since traditional WSN solutions are not meant to cope with such situations, existing protocols and algorithms must be adapted or re-designed to obtain systems able to adapt their workload scheduling to the stochastic nature of environmen- tal energy sources. Due to the relatively hight cost and long timescales needed to deploy and maintain large-scale wireless sensor networks, simulation is traditionally the tool of choice for WSN re- search. This is especially true for energy-harvesting wireless sensor networks (EH-WSN), as real-life validation of power- scavenging systems is further challenged by time and loca- tion dependent harvesting conditions, which largely compro- mise the repeatability of experiments. Moreover, running real experiments on EH-WSNs is time consuming, as assess- ing the robustness of a solution requires testing it under a variety of harvesting conditions. Simulations mitigate these issues by providing a cost-effective method to thoroughly test novel algorithms and schemes in a controlled and repro- ducible environment. Recognizing this need, many recent works have proposed dedicated harvesting-enabled frame- works and modeling tools [17, 31, 13, 9]. However, to the best of our knowledge, none of them is currently available to the wider research community, resulting in a lack of ac- cessible simulation tools to support the early-phase design and testing of harvesting-aware algorithms and protocols. In an attempt to fill this gap, in this work we describe the design and implementation of GreenCastalia [12], an open- source energy-harvesting framework for the popular Castalia simulator [2]. Castalia has recently gained wide acceptance in the WSN research community, as it features one of the most advanced channel and radio model among existing WSN simulators [25]. Castalia also provides a highly flex- ible model of sensor devices that includes noise and bias, which can be used to define accurate models of physical pro- cesses. Despite many desirable features, the current version of Castalia does not support simulation of energy-harvest- ing systems, and it only provides an ideal battery model. Our proposed solution, GreenCastalia, integrates into the Castalia simulator, extending it with a flexible framework to simulate networks of embedded devices with heteroge- neous harvesting and energy storage capabilities. Moreover, it supports multi-source harvesting architectures that are becoming increasingly popular to enhance the overall effi-