## 3 Experimental Set-up  
We have defined a set of experiments to test the improvements, if any, achieved by using the proposed fuzzy control based self-adaptive system in a WSN. There are four main parameters that rule the behavior of the self-adaptive system deployed in the SunSPOT nodes: \(ND_{R}\), \(\xi_{ND}\), \(k_{CR}\) and \(E_{CR}\), which have been modified in the different experiments to observe each parameter impact on the system efficiency. * \(ND_{R}\) is the number of neighbors, a reference value, that the node must have. That value could change over time and decrease if a node battery level drops below the critical value \(E_{CR}\). The initial value for \(ND_{R}\) depends on the number of nodes in the WSN and the deployment area, as mentioned in previous sections. * \(\xi_{ND}\) determines when the difference (\(\emph{e}_{ND}\)) between a node \(ND_{R}\) and its real number of neighbors is significant enough to trigger the reasoner, avoiding useless executions of task _TR1_. More precisely, the task _TM1_ in the component _PowerScalingMonitor_ will trigger the task _TR1_ in the component _PowerScalingReasoner_ when \(|e_{ND}(k)|-\xi_{ND}>0\), where \(|e_{ND}(k)|\) represents the absolute value of the error \(e_{ND}\) in the \(k\) instant. * \(k_{CR}\) amplifies _FDM1_ output, the required change in the node transmission power to meet \(ND_{R}\). This parameter influences how long it takes the system to get \(ND_{R}\) number of neighbors. For instance, a high value for \(k_{CR}\) in a system where the number of neighbors of a node changes significantly, e.g., due to environmental changes, implies that it will take less system cycles to recover \(ND_{R}\). * \(E_{CR}\) is a system reference value that establishes the battery level value that suggests a higher energy consumption saving to extend the battery lifetime. When the real battery level drops below \(E_{CR}\), the system should reduce energy consumption by reducing the transmission power, acting on the reference value for the number of neighbors of the node. In this paper we focus on the first three ones. We also did two control experiments with the self-adaptive system inactive to compare the system performance when the self-adaptive system is on and off. The total number of experiments was ten: two with a fixed transmission power, and eight with an adaptive transmission power ruled by the proposed control system and a set of different parameters to test their performance. The parameters used for these control experiments are shown in Table 1.  
The nodes used in the experiments were eight SunSPOT wireless sensors nodes [10], like the one in Figure 5a. All the SunSPOT nodes used in the experiments use the same hardware revision, that is revision 8.2 for the main board, and revision 8.1 for the sensor board. They were updated to the developer version codenamed \"_teal-120517_\" in order to solve an issue with the readings of the battery values in the previous SunSPOT SDK release. We also used a SunSPOT base station, which is just like any other SunSPOT device, but without the sensor board. The SunSPOT base station was attached to a computer through the USB port, and was used as a sink for the status messages sent by the sensor nodes, as well as to enable the remote management of the control system parameters used in the deployed sensor nodes. It also took a passive role in the neighbor discovery protocol, and an active role in the routing protocol. The status messages had a fixed length of 60 bytes, and carried out information regarding the round of the experiment, the time-stamp, the current number of neighbors, the maximum and available battery capacity, the configuration parameters used in the associated round and the next hop as indicated by the node routing protocol.