[Tinyos-devel] DutyCycle vs SleepInterval

Razvan Musaloiu-E. razvanm at cs.jhu.edu
Fri Jan 9 17:56:22 PST 2009


Hi!

The current LowPowerListening [1] interface contains two sets of 
commands: one using intervals expressing sleep intervals and another one 
using percentages expressing duty-cycles. What I would like to bring into 
discussion is the duty-cycles.

For reference here is the interface:

 	interface LowPowerListening {
 	  command void setLocalSleepInterval(uint16_t sleepIntervalMs);
 	  command uint16_t getLocalSleepInterval();
 	  command void setRxSleepInterval(message_t *msg, uint16_t sleepIntervalMs);
 	  command uint16_t getRxSleepInterval(message_t *msg);

 	  command void setLocalDutyCycle(uint16_t dutyCycle);
 	  command uint16_t getLocalDutyCycle();
 	  command void setRxDutyCycle(message_t *msg, uint16_t dutyCycle);
 	  command uint16_t getRxDutyCycle(message_t *msg);

 	  command uint16_t dutyCycleToSleepInterval(uint16_t dutyCycle);
 	  command uint16_t sleepIntervalToDutyCycle(uint16_t sleepInterval);
 	}


So for intervals we have 64K possible values. The duty cycles are 
expressed in 1/100 increments so for them we have 10000 possible values. 
For CC2420 these 10000 values actually corresponds only to about 650 
unique sleep intervals.

Another issue is the fact that the duty-cycle is not guarantee. The 
current LPL doesn't track the achieved duty-cycle and dynamically adjust 
the sleep intervals in order to meet a certain one. What happens is a 
fixed sleep interval is picked by translating the duty-cycle to a sleep 
interval using a fixed knowledge about how much the probing should take. 
So basically the semantics is that that duty-cycle will be achieved only 
if there is no traffic and no false wakeups. I find this definition 
cumbersome and not very attractive to work with.

So my questions are: what do people think about this? Do you usually use 
intervals or duty-cycles in your LPL applications? How does sliming down 
the LowPowerInterface to only 4 calls sound? :-)

[1] http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/html/tep105.html

All the best!
Razvan ME


More information about the Tinyos-devel mailing list