## 5 WSN Application Design
### Duty Cycle  
The best way to save energy in WSNs is maintaining nodes at non-operational power saving modes as much as it may be possible. The power consumption of the most consuming components of a node such as the CPU, radio and sensors varies significantly depending on their particular operational state. For example, the current drawn from the CPU in the sleep mode ranges between 1 \(\upmu\)A and 50 \(\upmu\)A depending on the processor technology, which is three orders of magnitude lower than under normal operation. Similarly, the radio consumes a comparable amount of current, for example for a MICAz sensor node, it ranges from less than 1 \(\upmu\)A in the sleep mode to several mA in the operational mode [56]. In addition, for most commercial devices, the power spent in the receiving mode is comparable to the one consumed while transmitting. Consequently, rather than reducing the number of transmissions, it is more beneficial to reduce the period during which the radio is active (listening to the channel). Power savings for all these components are usually accomplished by means of a technique known as \"duty cycling\", which manages the activity periods of the nodes. It is aimed at dividing the working period of a node into two main parts, namely: (i) the active period, where the components perform their operation, and (ii) the sleep period, where they remain inactive. The ratio between the time the system is active _versus_ the total time under consideration (active plus sleep periods) is called duty cycle. This concept is usually applied to the operation of the radio equipment. However, it can be extended to the sensor devices as well, being possible to use either the same duty cycle or a different one for both. In any case, a small duty cycle helps saving large amounts of energy and so it extends node and network lifetimes, as it allows not only the radio and sensors, but also the CPU which drives their operation, to periodically enter the sleep mode. On the other hand, small duty cycles may jeopardize the proper behavior of the system. Hence, an appropriate scheduling of the duty cycle is critical in order to avoid the loss of events of interest and to offer adequate QoS guarantees, especially for real-time safety applications. The duty cycle design determines the duration of both active and sleep periods. A first consideration regards the duration of the entire sleep/wake-up cycle, which must find a compromise between power consumption and responsiveness. This duration has a lower limit imposed by the wake-up times of the components of the node. Under this threshold the node is not power-efficient since the energy consumed in frequent activations of components is higher than that saved during the sleep period. Processors and radio transceivers are typically the most restrictive components to these regards, with wake-up times ranging between a few us and several ms depending on the technology employed. However, some sensors may impose higher and therefore more restrictive times. Conversely, the desired level of system responsiveness defines the upper limit of the whole cycle and it is directly related to the duration of the sleep state that is described next. The limitations imposed on the sleep period depend mainly on its impact on the vehicle detection by the sensors and on the event propagation done by the radio. Regarding vehicle detection, the sleep period cannot be larger than the time spent by a vehicle passing near a node, otherwise there is a high probability of missing the event. This period is, therefore, directly related to the speed of vehicles and the detection range of sensors. However, there are some works that propose operational modes which assume that a vehicle must not necessarily be detected by a single node since it can be detected by subsequent nodes [36]. Concerning the radio, long sleep periods may negatively affect the dissemination of events by introducing additional delays in each message transmission.