# Wireless Sensor Networks for Smart Homes:
## 4 Performance Assessment
### Obtained Results  
Several simulations have been carried out to prove the proposed solution. Both the ratio of Throughput to Workload (\(Th/WI\)) and the battery level have been assessed. The battery level during a simulation period of 48 h is depicted in Figure 7. Even the results achieved without FLC have been  
Figure 6: Battery consumption flow chart created in Simulink/StateFlow. taken into account, i.e., assuming that the transmission power (0 dB) and the sleeping time (equal to 1, coinciding with the sampling time) are both fixed. Figure 7 reveals that the proposed fuzzy-based approach reaches a real power consumption reduction and, consequently, it lengthens the device lifetime. Using trapezoidal MFs, the battery is fully discharged after about 169,950 s (47 h and 21 min). In the case without the FLC, the battery is fully discharged much earlier, after about 120,000 s, i.e., after 33 h and 50 min. Hence, it is evident that the trapezoidal MFS has obtained concrete improvement respect to the case without FLC. Using the approach proposed by [PERSON] et al. the battery is fully discharged after about 155,600 s (43 h and 22 min). Even in this case, it is proved that the performance of the proposed fuzzy-based solution is better than the one proposed by [PERSON] et al. During the simulation period of 48 h, the ratio of \(Th/Wl\) has been assessed, and its performance is represented in Figure 8. As it is possible to recognize, practicing the fuzzy-based approach proposed in this work the \(Th/Wl\) flutters between about 20% and 70%. Considering the method suggested by [PERSON] et al. the \(Th/Wl\) range differs from 25% to 59% on average. On the contrary, the values collected without FLC fluctuate from 31% to 77%, representing the soundest results concerning the ratio of \(Th/Wl\) but at the expense of the battery consumption. Nevertheless, it is essential to remark that the values obtained with the proposed FLC and even those measured with the approach of [PERSON] et al. are satisfactory particularly in those application fields in smart homes with a reasonable variety of data, e.g., temperature, humidity or light detection. In these cases, the most relevant goal is to increase, as much as possible, the battery life rather than guaranteeing high \(Th/Wl\) performance. Instead, the \(Th/Wl\) behavior achieved with the proposed FLC would not be appropriate in a context characterized by real-time constraints, in which the _sleeping_time_ of network nodes should not be increased too much to obtain and ensure high values of the ratio \(Th/Wl\). A real testbed scenario has been effectuated to prove the obtained results also on physical hardware devices. This situation allows demonstrating both the facility of implementation of the fuzzy-based approach proposed in this paper and its effectiveness. The hardware boards used in the considered IEEE 802.15.4 network for smart home use the Microchip PIC24F [59] and the MRF24J40 MB IEEE 802.15.4 Radio Frequency Transceiver [60]. The Microchip PIC24F integrates the control characteristics of a microcontroller unit with the processing and throughput capacities of a digital signal processor. This 16-bit microcontroller has a maximum processing power of 16 MIPS and grants multiple serial ports (3x12C, 3 xSPI), 4 xUARTS and 23 independent timers. The availability of 16 kB of RAM memory for buffering, of up to 256 kB of enhanced flash program memory, and other features make this microcontroller very suitable for low power (<100 nA standby current),  
Figure 7: Battery consumption. embedded control and monitoring applications.The considered WSN has been a star network with one central network controller and 4 sensor nodes that communicate directly with the network controller.