## 4 LOKA: LOw Power Consumption Algorithm
Since replicating LOKA using other hardware platforms is expensive and time-consuming we have checked instead the energy consumption of these platforms in literature and compare them with the results we have gathered previously. Specially, we have chosen: _Mica2_[41], _Telos_[42], _TinyNode_[43] and _EyesIFX_[44]. The reason to use these platforms is they implement a duty-cycling mechanism documented in TinyOS [45] and their energy consumptions have been analyzed in the hardware data sheets. Figure 5.0 Results for the energy consumption of our experiments. Figure 5.1 Results for the energy consumption, transmission time and interval with LOKA and without LOKA. Each point in the figure actually contains 30 or 5 measures; the low variability makes them appear in the figure like a single point. While it is true that the energy consumption depends on many varying parameters e.g., MCUs frequency, CPUs architectures and duty-cycling mechanisms, the comparison establishes an actual reference where the energy consumption magnitudes are showed. Taking into account that all of them have similar hardware and a duty-cycling approach, this comparison displays LOKA's prototype like a good alternative. In the core of these platforms, _TinyNode_, _Telos_ and _EyesIFX_ are composed of a MSP430F1611, a 16-bits 8 MHz microcontroller and _Mica2_ is composed of a ATmega128L, a 8-bits 8 MHz microcontroller. Our prototype uses a LPC824 microcontroller. The radio transceivers are different: _Mica2_ uses a TICC100 device, _Telos_ a TICC2420, _TinyNode_ a XE1205 and _EyesIFX_ a TDA5250. Our prototype uses a XB24-Z7 WIT-004. As shown in the Table 1, the microcontroller where LOKA was deployed consumes less energy than the other microcontrollers. On the one hand, the energy consumption of the microcontroller in sleep mode is minimized 97% with respect to the MSP430F1611 microcontroller and 99% with respect to the ATmega128L microcontroller. On the other hand, the energy consumption of the microcontroller in active mode is minimized 39% with respect to the MSP430F1611 microcontroller and 86% with respect to the ATmega128L microcontroller. In regard to the radio transceiver, the XB24 consumes more energy than the other radio transceivers since it has a flash memory inside and a powerful microcontroller to manage the ZigBee protocol. In the sleep mode case, the radio transceivers consume similar energy, yet the energy consumption can be tripled in the active mode case when the UART serial interface is used to send and receive information. It is not a problem since the time that LOKA uses the UART serial interface is very small. In regard to the active mode case without using UART serial interface, the XB24 manufacturer does not provide information. Moreover, as can be noted from the Table 1, _Telos_, _TinyNode_ and _EyesIFX_ have a similar hardware energy consumption and _Mica2_ has more consumption since its microcontroller energy consumption in active mode is very high (taking into account that all of them use the same software). This was pointed out by [PERSON] et al. [43]. They checked the energy consumption at 1% duty-cycling mechanism, realizing that _Mica2_ consumed 509 W and _TinyNode_ 489 W.

These values were calculated without considering any sensor, therefore, the Equation (6) calculates an estimation of the real consumption along an operation time (t) using the sensors of the Section 5.1. The Table 2 shows the results for different operation times. The Table 2 shows the energy consumption at 1% duty-cycling (D) mechanism, yet LOKA was tested at different D. Therefore, we need to analyze the results of the Section 5.2 to know the energy consumption at the same D. In this sense, the power in active mode can be inferred applying the Equation (8), where the energy consumption in sleep mode is deprecated. Then, the energy consumption at 1% D is obtained applying the Equation (9). Finally, the Table 2 shows the results for different operation times.