Experimental Assessment of the Battery Lifetime in WSN Based on the Duty-Cycle Current Average Method

A great amount of work addressed methods for predicting the battery lifetime in wireless sensor systems. In spite of these efforts, the reported experimental results demonstrate that the duty-cycle current average method, which is widely used to this aim, fails in accurately estimating the battery life time of most of the presented wireless sensor system applications. The aim of this paper is to experimentally assess the duty-cycle current average method in order to give more effective insight on the effectiveness of the method. An electronic metering system, based on a dedicated PCB, has been designed and developed to experimentally measure node current consumption profiles and charge extracted from the battery in two selected case studies. A battery lifetime measurement (during 30 days) has been carried out. Experimental results have been assessed and compared with estimations given by using the duty-cycle current average method. Based on the measurement results, we show that the assumptions on which the method is based do not hold in real operating cases. The rationality of the duty-cycle current average method needs reconsidering.


Introduction
Nowadays, WSNs are used for many different applications, but systems are designed in a rather ad-hoc manner without unified and systematic battery lifetime analysis.Since the quantity of battery charge is limited, it is desirably the longest possible lifetime.
For instance, in [1] authors present an ad-hoc WSN for motor energy monitoring but the node lifetime estimation method is not discussed.In [2] authors discuss WSN design for industrial automation applications; technical aspects and design approach are remarked, but issues related to node lifetime estimation are not addressed.In [3] authors introduce a solar energy self-powered wireless sensor network.Issues regarding the devices for energy storing are discussed but the node current consumption is not modeled.In [4], authors highlight the need of achieving reduced current consumption in order to maximize battery lifetime but a systematic methodology for achieving is not proposed.In [5] a WSN application for pedestrian tracking and localization is presented, but the node lifetime estimation is not addressed.On the other hand, nowadays WSNs are also used as part of precision agriculture tools [6] [7], but methods related to node lifetime estimation still remain omitted.To the extent of our knowledge, after reviewing the state of the art (by means of well-known bibliographic and citation database of peer-reviewed scientific literature like SCOPUS, EBSCO, JSTOR, IOP science, and IEEE Xplore), we argue that WSN designers avoided carrying out long-term measurements in order to validate battery depletion estimate models for WSN applications.Designers use the duty-cycle current average method, which is nowadays the most accepted method.However, designers often report that batteries are depleted prematurely with respect to the estimation given by such method (e.g.[8]- [12]).
The aim of this paper is to experimentally assess the duty-cycle current average method in order to give more effective insight on the effectiveness of the method.We present a counterexample based on measurements in order to show how the duty-cycle current average method can fail the battery lifetime estimation.As we need a solid understanding of the battery current consumption profile, we have designed an electronic metering system based on a dedicated PCB, which visualizes the node current consumption profile and charge extracted from the battery during the wireless sensor node operation (e.g.transmission, signal sampling).The node used in the experiments is the MICAz [13] running applications developed by using nesC language [14].The TinyOS [15] version is provided by the software platform MOTEWORK [16] and the radio transceiver is the Chipcon CC2420 [17].The node is powered by two non-rechargeable alkaline IEC-LR6 cells, size AA.
By using the proposed electronic metering system, measurements of two case studies have been performed; the experimental results provide evidence to explain why the duty-cycle current average method is not reliable for the estimation of the battery lifetime.An experimental battery full-depletion time measurement has been conducted to compare the result against the estimation given by the duty-cycle current average method.

Wireless Sensor Task and Duty-Cycle Definition
The TinyOs operating system manages the node hardware resources; it is based on the hardware abstraction layers software model (TEP 2 [15]), where each level gives services to upper layers through interfaces.The bottom layer is named Hardware Presentation Layer (HPL) and it is responsible for accessing hardware resources.This is explained in the documented TinyOS Enhancement Proposals also named TEPs (in this case see TEP 2 from [15]).By using this software model, designers can develop programs by using customized interfaces through which the lower hardware abstraction layers are invisible.The WSN application is implemented at the top level (Hardware Interface Layer or HIL).In this framework, the tasks represent applications performed by the wireless sensor node: e.g.sensor signal sampling, radio transmission and signal processing.The node wakes up (from power down state) in order to execute the task and afterwards goes into sleep mode (power down).In other words, a task is the activity that the node performs between two power down states.Each task is executed at the rate R (number of tasks per second) and the task time duration is defined as the active period A T (each task has its own A T ).The node duty-cycle time interval D is defined as .
A D RT = During the execution of a task, the node circuit consumes the battery charge ( ) which is named task charge cost henceforth.Figure 1 shows the current consumption profile for a transmission task, where the marked time intervals are: interval A ( )

Battery Lifetime Estimation Approach
As Figure 2 shows, we need to estimate the time S L (node lifetime or service hours) at which the battery vol-  The current consumption ( ) i t is determined by the hardware platform and the operating system features.
There has been a lot of effort for building models capable of predicting the current consumption profile ( ) i t , see for instance [18]- [21], but the problem is difficult and not easily tractable.
On the other hand, see for instance [22]- [25], there is no consensus about the description of the battery voltage ( ) B V t as function of ( ) i t .Approaches have converged toward the duty-cycle current average method, which is the most widely used to estimate the S L value.The method approximates the node current consump- tion with step-shaped waveforms (named ( ) s i t from herein) that best approximate ( ) i t .The node duty-cycle is assumed to be deterministic and known beforehand.The ( ) s i t integration over the time A T estimates the node charge consumption value.This charge value is then used to estimate the average constant current consumption d i for such duty-cycle; it is used to estimate the lifetime s T value by means of the graph constant current discharge vs. hours service, as Figure 3 shows, which is provided by the battery datasheet.From the battery service hours graph it is possible to derive the log-linear relation between the constant current d i and the service hours s T for a given cutoff voltage (e.g. the marked ones with 0.8 V, 1 V and 1.2 V in Figure 3).For example, for the cutoff voltage value 1.2 V, the straight line linking the points (20 mA, 100 h) and (80 mA, 20 h) is as follows: The coefficient m is given by:  Then: Some node platforms vendors provide electronic sheets based on this method; see for example the Mote Battery Life Calculator from Crossbow Technology [26] and other examples given by [27] [28].For examples, in Equation ( 4 To summarize, the hypotheses for using the duty-cycle current average method are the following: • H 1 ) the node current consumption profile as function of the given application is known.It is a deterministic waveform that can be always approximated by a step-shaped waveform.The node duty-cycle will be constant during the node lifetime.• H 2 ) superposition principle: let's assume that a node performs task 1 with charge cost L .If task 3 is defined as the task 1 plus task 2 (e.g.task 1 performs transmission and task 2 performs signal sampling and data storage, then, task 3 implements both activities, signal sampling, data storage and transmission), the superposition principle states that . We aim to demonstrate that H 1 ) and H 2 ) hypotheses do not always hold.In the next section, we present the metering system that has been used to experimentally assess the two hypotheses.

Electronic Metering System
The metering system is based on a dedicated PCB: it visualizes the node current consumption and the task's charge cost c Q .The prototype PCB is based on the following devices: the High Side Current Shunt Monitor INA139 [30] and the Coulomb Counter LTC4150 [31].Figure 4 shows the metering system block diagram.The INA139 amplifies the voltage across a shunt resistance between battery and load.The measured voltage is proportional to the battery current consumption.The output voltage signal is in input to an amplification stage and subsequently to an oscilloscope where the current waveform associated to the node task can be analyzed.The shunt resistance value has been selected so that the INA139 gain provides the maximum output voltage range at the maximum node current consumption.The board is powered by a 3 V voltage.The charge counter characterizes the node in terms of consumed charge; values are expressed in charge units (mAh or μAh).The LTC4150 device is a voltage integrator with a voltage-to-frequency converter.The coulomb counter device forces to zero the output pin voltage when a fixed quantity of charge M Q has been measured.The value of 5.2 μAh M Q = has been obtained by calibration as it is suggested in the device datasheet.The time period between consecutive output pulses is proportional to the value of M Q .Figure 4 shows the block di- agram of the experimental setup.If the number of counted pulses within a given time observation window T is equal to K , then the total charge consumed by the node is . Under the assumption that the node executes N times the same task during the time T , we estimate the average task charge cost value c Q as Equation ( 5), where N is such that N R T = ⋅ (the measurement ends when time T is reached and the task has been executed N times).
The error is given by Equation ( 6) where We use the following example to illustrate the methodology.If the node performs packet transmissions at the rate 10 R = packets/s, for a given time, e.g.T = 3600 s, the number of performed tasks (equal to the number of packet transmissions) is 36000 N = . If we count, for instance, 1000 K = pulses, from Equation ( 5) the charge cost associated to the transmission task and the related error result as follows: As a final remark, we observe that the best set of values { } , T R to perform the experiment is such that 1 N  values (e.g.1000 or more), in order to meet the condition The proposed method has the disadvantage that it requires long time measurements.A suitable value of T (or N) is not known a priori, because the value c Q is obviously not known, as well as the K value.This problem can be overcome with an iterative procedure, by performing several measurements.In general from our experience, we have not conducted measurement of more than 4 hours.In this article, the node tasks under evaluation are transmissions (task 1) and temperature sensor sampling (task 2).The measured amount of charge c Q for each task is shown in Table 1.

Battery Lifetime Time Measurement
The MICAz node has been programmed to transmit one packet with a payload of 25 bytes, at the output power level of −25 dB•m.The transmission rate is 1 20 s R − = (i.e.50 ms time interval between packet transmissions).Please note that the given transmission rate value is high for usual real wireless sensor networks applications.The transmission rate value has been selected to perform the experiment in a reasonable time (i.e.some days, no more than one month).The node could be considered not working when the voltage power supply drops value below 2.4 V (i.e.individual cell voltage value of 1.2 V).We daily measured the battery voltage and the result is shown in Figure 5; the voltage value 2.4 V has been achieved in 30 days.The current consumption profile has been measured during transmission; it is shown in Figure 1.The resulting duty-cycle is 6.44 ms 50 ms 0.13 D = = . In accordance with the duty-cycle current average method, it is assumed that this current profile is repeated each time that the radio performs a transmission.By numerical integration, the average discharge current inside the duty-cycle time interval is given by 2.04 mA ; the estimated battery lifetime (Equation ( 4)) is 1375.4hs s T = , i.e. 57.3 days, with an error of 27 days with respect to the measured one.At this point, it is necessary to understand why there is such big difference between estimated and measured results.To this aim, we used the metering system for visualizing the node current consumption profile.

Assessment of H 1 Hypothesis
Differently to the previously presented lifetime estimate, we use Q c = 0.042 μAh (see Table 1).The average current consumption is 50 ms 3.02 mA and by means of Equation ( 4), the estimated lifetime is 859.0 h s T = (i.e.35.8 days), which is a better approximation with respect to the previous one.We conclude that the 1 H hypothesis does not hold.The metering system provides excellent accuracy to measure c Q for large N values.It is not necessary to assume any node current consumption profile beforehand and the overall current consumption is taken into account to measure c Q (including node start-up and power down states).The reduced current consumption levels are frequently neglected in the duty-cycle current average method, nevertheless, they could have cumulative effects during the node lifetime.It is not enough to observe the current consumption profile for a short time to estimate the real required charge c Q because our measurements shows non periodic current consumption profile.In fact, we observed a time-varying duty cycle (time-varying current consumption).Figure 6 shows three different observed cases, among others.The difference between duty-cycle values of cases A and C is 48.9%.Then, it is not possible to have a deterministic known current profile during transmissions and the 1 H hypothesis which states that the duty-cycle is constant, does not hold.Therefore, without a reliable value of the duty cycle value, the duty-cycle current average method can estimate the lifetime value very roughly.In fact, it is not possible to assume a priori node current consumption profile and the experimental characterization should be done for every given application.The node tasks are controlled by the program that runs inside the microcontroller under the supervision of an operating system like TinyOS [14].Most of the time, the operating system asynchronously manages hardware resources in order to provide services to asynchronous events related to the wireless communication.More specifically, the origin of this non deterministic behavior is given by the method used for the clear channel assessment in most of the MAC layer protocols (see Chapter 5 MAC Protocols in [20]).Therefore, generally speaking, the node awakes and sleeps in a non-deterministic way and the battery is forced to deliver current patterns which are not easily predictable, neither the duty-cycle value.The duty-cycle current average method requires the knowledge of the deterministic node current consumption, but we assessed that it is not possible.

Assessment of H 2 Hypothesis
Table 1 shows charge costs for the tasks 1 and 2. Task 3 is defined as the sampling plus the transmission tasks, i.e. the node performs signal sampling and then packet transmission.The H 2 hypothesis states that the expected battery charge cost 3 c Q for task 3 should be equal to the sum of 1 c Q (task 1) and 2 c Q (task 2).To verify the H 2 hypothesis, we implemented the task 3 and experimental measurements have been performed.
The measurements show that H 2 hypothesis does not hold.The results are presented in Table 2; they are sig-   nificantly different with respect to the expected ones.The reason behind this result is due to the effects of node programming methods and compilers features which have a strong influence on the node current consumption profile.In fact, the operating system behavior and how hardware resources are managed, make unreliable the application of the superposition principle.
No withstanding the fact that programs are written in nesC, i.e. they are based on customized interfaces and modules which provide modularity, encapsulation and re-usability features; such benefits are counterbalanced by the impossibility of using the duty-cycle current average method for battery lifetime estimation.

Conclusions
The WSNs are comprised of battery-powered embedded electronic devices.A great amount of research has been devoted to the development of methods capable of predicting battery lifetime.Regardless of such efforts, most of the wireless sensors applications have prematurely depleted batteries, contrary to the estimations based on the widely adopted duty-cycle current average method.Our work experimentally assesses such discrepancy.An electronic metering system, based on a dedicated PCB to experimentally measure node current consumption profiles and charge extracted from the battery for two selected case studies, has been designed and implemented.Based on the measurement results, we demonstrate that the hypotheses on which the method is based are not reliable.The concluding remarks to be taken into account for the development of WSN applications are: 1) the software architecture and how to develop the application program have strong influence on the node current consumption profile and hence, on the battery lifetime; 2) the node current consumption profile as function of the given application as well as the duty-cycle is not deterministic.The duty-cycle current average method has another hypothesis which has not been considered: the battery operating temperature, which would have significant effect on the graph constant current discharge vs. hours service.It should be addressed as future research trend.

1 T 2 T 3 T 5 T 7 T
node wake up; interval B ( ) , radio transceiver start-up; interval C ( ) , MAC layer functions such as channel assessment and backoff-time calculations and receiver system calibration; interval D ( ) , transmission; interval E ( ) , reception mode according to the MAC protocol [17], waiting for ACK packets.At the end, the node gets power down state (P.D.), waiting for the next timer interruption for next task execution.

Figure 3 .
Figure 3. Battery service hours for different constant current consumption values (figure from [29]).
another hand, let's assume that the same node performs task 2 with charge cost 2 c Q during lifetime 2 s

Figure 4 .
Figure 4. Block diagram of the experimental setup.

Figure 6 .
Figure 6.Three different measurements that show the time-varying node current profile behavior because of the random nature of backoff-time calculation for the MAC layer.Please, note how the T A value varies.Case A: 9.2 ms 50 ms D ≈ or 18.4%; Case B: 7.5 ms 50 ms D ≈ or 15.0%; Case C: 4.5 ms 50 ms D ≈ or 9.0%.

Table 1 .
Measured charge Q c .

Table 2 .
Measured charge Q c .