Modeling and Simulation of Energy-Aware Adaptive

0 downloads 0 Views 544KB Size Report
them through an energy-aware simulator for AWS systems. Categories and Subject ... Systems (CPS), interacting with the physical world through sensors and ...
Modeling and Simulation of Energy-Aware Adaptive Policies for Automatic Weather Stations Daniel Cesarini, Luca Cassano, Alessio Fagioli, and Marco Avvenuti Department of Information Engineering, University of Pisa, Italy E-mail: [email protected]

ABSTRACT In this paper we present a methodology to model and analyse from the energetic point of view energy-aware adaptive applications for sensing and communication running on top of an Automatic Weather Station (AWS). Applications are modeled as a suite of independent policies, one for each sensing or transmission device. A policy is a set of rules that describe the behaviour of applications. Policies are modeled independently of the actual application implementation, so that designers could evaluate the energetic feasibility of the application early in the design process of the AWS. Policies dynamically modify the sampling frequency of sensors and the transmission starting time according to the amount of energy that could be harvested from the environment and to the amount of energy stored in the battery. In order to assess the e↵ectiveness of the modeled policies we simulated them through an energy-aware simulator for AWS systems.

Categories and Subject Descriptors C.4 [Computer Systems Organization]: Performance of Systems—Measurement techniques; J.6 [Computer Applications]: Computer Aided Engineering—Computer-aided design (CAD)

General Terms Measurement, Performance

Keywords Power Models, Energy Harvesting, Glaciology, Modeling

1.

INTRODUCTION AND RELATED WORK

Automatic Weather Stations (AWSs) are used to sense meteorological and climate conditions in harsh environments, such as deserts, Antarctica, and High Alpine Environment [1]. A typical AWS is made of a power supply, a processing unit and a number of sensors to measure temperature, humidity, 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. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. ES4CPS ’14, March 28 2014, Dresden, Germany. Copyright 2014 ACM 978-1-4503-2614-8/14/03 http://dx.doi.org/10.1145/2559627.2559631 ...$15.00.

solar radiation, etc. If telemetry is needed it can be implemented using WiFi links, radio bridges, GSM, or satellite links. Since AWSs are generally deployed far from main power sources they need to be energetically autonomous and thus they use solar or wind energy harvesting to operate and to recharge batteries [8]. Automatic Weather Stations (AWSs) can be considered as a sub-class of Cyber-Physical Systems (CPS), interacting with the physical world through sensors and harvesting devices. The design of AWSs systems imposes severe issues to designers. Since the working environment of an AWS is generally not only harsh, but also very difficult to be reached (and in some cases even unreachable for long periods over the year) it is vital that the system is able to guarantee continuous operation in any working condition [2]. This requirement is generally fulfilled by over-dimensioning energyrelated components, i.e., harvesting and storage, with the result of increased cost and size of the system. Providing the AWS with the ability to adapt its functioning parameters, e.g., sampling frequency of sensors or frequency and duration of transmissions, represents a very interesting solution, to overcome these problems [4]. To ensure the survival and continuity of data acquisition the AWS should: (i) always use less energy than the available one; (ii) maximize the amount of sampled data; and (iii) adapt to the changes of the environmental conditions. The task of adapting to changing sensing and transmission frequencies can be carried out using Adaptive Duty Cycling [5], or using Energy-aware Lazy Scheduling Algorithms [11]. Moreover, existing works are much focused in analysing the subsystems of the AWS from a hardware point of view, while the impact of the application running on the processing unit on the energetic balance of the AWS has not yet been extensively studied. Since, as we previously discussed, an AWS is generally unreachable for long periods over the year, and thus maintenance interventions are often not possible, it is vital that designers carefully design all the energy related sub-components of the system as well as the application running on top of the processing unit. To ease this task a number of techniques and tools have been proposed in the literature. Analytical models of the energy balance of plants based on solar cells and wind turbines are widely used [9]. Moreover, testbedbased power profiling techniques and software-based power measurement tools can also be found in the literature [10]. Finally, simulative approaches for the analysis of the energetic behavior of AWSs can be found in the literature. Some of these simulators focus on the power analysis of the hard-

ware components [7], while, recently, works more focusing on the simulative analysis of the e↵ects of software policies on the energetic behaviour of an AWS have been published [6]. This paper presents the preliminary results of an interdisciplinary research activity aimed at modeling and simulating AWS systems for the feasibility analysis of both hardware and software components from the energetic point of view. We present a general methodology to model energy-aware adaptive sensing and communication applications for AWS systems. The applications are modeled as independent policies, one for each hardware device of the AWS. Policies are modeled without respect of the final implementation, in order to let designers free to evaluate the energetic behaviour of the AWS early during the design process and without posing constraints to the implementation. The aim of the modeled policies is to dynamically modify the sampling frequency of sensors and the starting time of transmissions according to the amount of energy that could be harvested from the environment and to the amount of energy stored in the battery. The e↵ectiveness of the modeled policies has then been assessed using the energy-aware AWS simulator proposed in [6]. The remainder of this paper is organized as follows: Section 2 presents the general structure of an AWS and its applications; Section 3 discusses the proposed model of sensing and communication policies; Section 4 presents results from the simulative evaluation of some sample policies; Finally, Section 5 concludes the paper.

2.

GENERAL AWS ARCHITECTURE

The general architecture of an AWS, as shown in Figure 1, is composed of the following subsystems: (i) processing unit, normally coupled with a persistent memory, to save data; (ii) sensors, passive sensors (e.g. thermistors, humidity) generally have lower current drains than active sensors (e.g. snow / water height sonar); (iii) transceiver(s), can be implemented using WiFi, RF bridge, Cellular (GSM) or Satellite Modem; (iv) energy harvesting unit(s), can be wind turbines and photovoltaic panels; and (v) power supply, that is generally composed of a battery (NiMh, Li-Ion, or Lead Acid) and a regulation circuitry (battery charge and state management) [3]. The processing unit can be a microcontroller executing software programs, or an ASIC or FPGA device. When needed, applications activate sensors and transceivers. Users of data generated by the AWS sensors generally define the minimum needed sampling frequency and the transmission frequency, depending on the particular dynamics of the investigated phenomena and the need for data freshness respectively. These frequencies are usually statically determined. In other words, the AWS always performs the tasks in the same way, disregarding the status of the power supply and the amount of energy available from the environment (solar energy, wind energy). Users and designers of AWSs have to find a satisfactory trade-o↵ between energy survivability and amount of collected and transmitted data. Sometimes, in order to partially adapt to changes of the application requirements, e.g., more data are needed, or environment conditions, e.g., more energy is available during summer, applications running on AWSs are manually changed in some periods of the year.

3.

MODELING THE POLICIES OF AN AWS

Application Application Processing Processing Unit Unit

Energy Energy Harvesting Harvesting Unit(s) Unit(s)

Power Power supply supply Regulator Regulator Battery Battery

Sensors Sensors

Transceiver Transceiver

Figure 1: General architecture of an AWS: green/thick (orange/thin) continuous lines represent produced (consumed) energy; yellow/dashed lines represent control information

Energy-aware self adaptation of an AWS system is the ability of the system to adapt its working parameters to the environmental conditions. In particular, the system should be able to use all the energy that can be harvested from the environment to guarantee on the one hand its energetic survival and on the other hand an amount of sampled and transmitted data satisfactory from the data users point of view. More in detail, an AWS should be able to increase the amount of sampled and transmitted data when the energy stored in the battery and the amount of energy that can be harvested from the environment are high and to reduce them when either the battery level is low or few energy can be harvested from the environment. We model the application running on the processing unit of the AWS at the behavioural level, specifying how each device, i.e., sensors and modems of the AWS, have to be managed by the processing unit. Applications are modeled as a set of rules (policy) that describe their behaviour, disregarding the actual implementation technology. In this way, the modeled application could easily be implemented, by automatically translating the model into a hardware description language specification (if the processing unit in an ASIC or FPGA device) or into a program (if the processing unit is a microcontroller). In particular, we model applications as a set of independent policies. Each policy specifies how the processing unit of the AWS has to manage the device associated with the policy. We define adaptability from the sensing point of view as the ability of the processing unit of the AWS to adapt the sampling frequency to the environmental conditions. In particular, we reduce (increase) the sampling frequency of a given sensor when the amount of energy that can be harvested from the environment decreases (increases). This mechanism is disabled, and the the sampling frequency is fixed at a minimum value, when the battery level is lower than a given threshold. In this way, during sunny and windy days the AWS will collect a large amount of data, while during cloudy days or during the night the AWS will reduce the sampling frequency, thus saving energy. Nevertheless, we define a minimum value of sampling frequency in order to guarantee the minimum amount of sampled data required

b if Eb < Emin then i Fi Fmini h else if Eh > EM AXi then Fi FM AXi h else if Eh < Emin then i Fi Fmini else FM AXi Fmini Fi = h Eh h EM AXi Emin i end if

We decided to increase the sampling frequencies when Eh increases not only because this is the most safe strategy from the energetic point of view, but also because in these conditions the physical phenomena that the AWS monitors generally have higher dynamics and thus more samples are needed to study them. We define adaptability from the communication point of view as the ability of the processing unit of the AWS to dynamically decide whether to start or not a transmission according to the environmental conditions. In particular, the processing unit will start a transmission only if a minimum level of energy is stored in the battery and a minimum amount of energy could be harvested from the environment according to the values read from the environmental sensors. In this way we guarantee the feasibility of the communication from the point of view of the energetic survival of the system. In other words, with such a policy we force the AWS to start a transmission when the energetic impact of the transmission will for sure not a↵ect the survival of the system itself. We define a communication policy for every modem in the system. A policy for a given modem i is specified by Tmini , i.e., the minimum time between two consecutive transmisb h sions, Emin , and Emin . When at least Tmini has passed i i since the last transmission, every S seconds the AWS esh timates Eh , and calculates Eb . When Eh > Emin and i b Eb > Emini the AWS starts the transmission.

4.

EXPERIMENTAL RESULTS

S.s. S.c. A.s. A.c.

Table 1: Policies definition h h b Fmin FM AX Emin EM Emin AX 1/15m — — — — — — — — — 1/15m 1/2.5m 100mJ 600mJ 80% — — 100mJ — 80%

Tmin — 3h — 3h

100

Battery level [%]

by the final users, and a maximum value of sampling frequency, in order to avoid oversampling and wasting energy. The e↵ect of such a policy is to force the AWS to exploit all the available energy while guaranteeing the survival of the system when the battery level is higher than the energy threshold and to recharge the battery while warranting the minimum amount of sampled data when the battery level is lower than the threshold. We define a sensing policy for each sensor in the system. A policy for a given sensor i is specified by five thresholds: h h Fmini , FM AXi , Emin , and EM AXi i.e., the minimum and i the maximum energy that could be harvested from the enb vironment, and Emin , i.e., the minimum energy stored in i the battery. More in detail, every S seconds (with S the duration of the shortest duty cycle among all the sensors related to energy harvesting, i.e., light and wind sensors) the AWS estimates Eh , i.e., the amount of energy that can be harvested from the environment according to data read from the environmental sensors, and determines Eb , i.e., the amount of energy stored in the battery, and modifies the sampling frequency Fi of the ith sensor according to the following algorithm:

80

60

40 Static Adaptive

20

0 22/09/12

23/10/12

22/11/12

23/12/12

23/01/13

23/02/13

25/03/13

Time

Figure 2: Minimum battery levels

In order to assess the e↵ectiveness of the proposed modeling methodology we defined the static and adaptive set of policies (summarized in Table 1, where S.s., S.c., A.s., and A.c. represent Static sensing and communication policies, and Adaptive sensing and communication policies respectively) for the AWS on the La Mare alpine glacier presented in [1]. We analysed the defined policies using the energyaware simulator presented in [6]. The simulator can be configured with all the relevant electrical parameters, such as sensors, transceivers and processing unit drained current, power supply and solar panel characteristics and used communication protocol. We fed into the simulator the environmental data, i.e., light irradiance and temperature, sampled by the considered AWS in the period between 12/09/2012 and 05/04/2013 Fig. 2 shows the evolution of the minimum charge level of the battery day by day, with the static and the adaptive policies. It can be observed that in 4 days (31/12 to 03/01), the static policies led the AWS to the switch-o↵, while the adaptive policies were able to avoid the occurrence of this condition. This first results clearly show that the adaptive policies achieve the goal of guaranteeing the energetic survival of the system. In particular, this is due to the adaptive communication policies, that, by postponing transmissions when the battery energy level is low, avoid discharging the battery. Fig. 3 reports the analysis of the amount of energy wasted, i.e., energy provided by the environment but not used by the AWS, with the static and adaptive policies. In particular, Fig. 3(a) represents the di↵erence between the energy wasted with the static and the adaptive policies day by day (positive values are cases in which static wastes more than adaptive, negative values vice versa). Fig. 3(b) shows the evolution of the maximum charge level of the battery day by day. From these figures, it clearly appears that in most cases the adaptive policies lead the AWS to waste much less energy than the static policies. This is due to the adaptive sensing policies, that, by increasing the sampling frequency, lead the AWS to exploit much more the available energy. It is worth

1000

Wasted energy [J]

0 1000 2000 3000 4000 5000 22/09/12

23/10/12

23/11/12

24/12/12

24/01/13

24/02/13

27/03/13

Date

(a) Wasted energy di↵erence.

Battery level [%]

100

6.

80

ACKNOWLEDGEMENTS

This work was partially funded by the Italian MIUR Project PRIN 2010-11:“Response of morphoclimatic system dynamics to global changes and related geomorphological hazards”.

60

40

7.

Static Adaptive

20

0 22/09/12

23/10/12

22/11/12

23/12/12

23/01/13

23/02/13

25/03/13

Time

(b) Maximum battery levels. Figure 3: Static/Dynamic policy comparison in terms of wasted energy.

noting that the energy wasted by the adaptive policies is not null. This is due to the fact that we defined a maximum sampling frequency for each sensor and since, as it is obvious, the amount of energy that can be stored in the battery is finite. Moreover, by observing both Fig. 3(a) and Fig. 3(b), it appears that the cases in which the static policies lead the AWS to waste less energy than adaptive policies are those cases in which the battery in the adaptive case is completely charged while, the AWS in the static case is recharging his battery. Finally, in the static case, the AWS collected and transmitted 2MBytes, while in the adaptive case, the amount of sampled and transmitted data was 4.2MBytes. This result shows that the adaptive policies achieve the goal of maximizing the amount of data that the AWS is able to collect and transmit. This is due to the previously discussed ability of the adaptive policies of maximizing the usage of the available environmental energy.

5.

Results have shown that energy-aware adaptive policies modeled following the proposed methodology are able to achieve better results in terms of energetic balance with respect to static policies, i.e., avoid the switch-o↵ of the system. Moreover, by maximizing the amount of exploited energy, the specified adaptive policies allow the system to significantly increase the amount of sampled and transmitted data. As future work we will extend the models of sensing and communication policies in order to implement more complex and e↵ective adaptation strategies. Further we plan to implement an automatic translator to produce program and HDL specification skeletons starting from the high level policy models in order to help designers in the implementation of the applications.

CONCLUSIONS AND FUTURE WORK

We have presented a methodology to model and analyse from the energetic point of view energy-aware adaptive applications for sensing and communication running on AWSs. Applications are modeled at a high level of abstraction, without any reference to the final implementation so that designers can evaluate them soon in the design process of the AWS. Moreover, since policies are specified in the form of energy levels and frequency thresholds, we believe that such a modeling methodology could be easy-to-use for the final users.

REFERENCES

[1] S. Abbate, M. Avvenuti, L. Carturan, and D. Cesarini. Deploying a communicating automatic weather station on an alpine glacier. Procedia CS, 19(0):1190 – 1195, 2013. [2] J. E. Box, P. S. Anderson, and M. R. van den Broeke. Automatic weather stations on glaciers: Lessons to be learned, 2004. [3] D. Cesarini, V. Jelicic, V. Bilas, and M. Avvenuti. From single point of measurement to distributed sensing in long-term glacier monitoring. Journal of Physics: Conference Series, 450(1):012050, 2013. [4] S. K. Gupta, T. Mukherjee, G. Varsamopoulos, and A. Banerjee. Research directions in energy-sustainable cyber–physical systems. Sustainable Computing: Informatics and Systems, 1(1):57 – 74, 2011. [5] J. Hsu, S. Zahedi, A. Kansal, M. Srivastava, and V. Raghunathan. Adaptive duty cycling for energy harvesting systems. In Proc. of the 2006 Internat. Symposium on Low Power Electronics and Design, pages 180–185, 2006. [6] M. Avvenuti, L. Cassano, D. Cesarini and S. Mandal´ a. Simulation of automatic weather stations for the energy estimation of sensing and communication software policies. In Proc. of 5th ExtremeCom, 2013. [7] D. Pimentel, P. Musilek, and A. Knight. Energy harvesting simulation for automatic Arctic monitoring stations. In IEEE Electric Power and Energy Conf. (EPEC), pages 1–6, Aug. 2010. [8] S. Priya and D. Inman. Energy harvesting technologies. Spinger Verlag, New York, 2009. [9] D. Rakhmatov and S. Vrudhula. Energy management for battery-powered embedded systems. ACM Trans. on Embedded Comp. Syss., 2:277–324, 2003. [10] S. Sundresh, W. Kim, and G. Agha. Sens: a sensor, environment and network simulator. In Proc. 37th Annual Simulation Symp., pages 221–228, April 2004. [11] C. M. Vigorito, D. Ganesan, and A. G. Barto. Adaptive control of duty cycling in energy-harvesting wireless sensor networks. In 4th Proceedings of SECON Conference ’07, pages 21–30. IEEE, 2007.