## 4 Experimental Results
### Evaluation of the Collaborative Scheme  
In order to show the effects of the collaborative scheme on each sensor, a model system for olive tree pests is given as a real-world application of the collaborative knowledge-based WSN. We consider this application as a case of FRBS modeling instead of FRBS control since there is no real time action that affects the input variables. However, it would be possible to evaluate the suitability of insecticide treatments on the trees. The development of the olive tree fly is strongly related to the temperature and humidity conditions of the environment. In real world, it is possible to observe isolated or grouped areas with high concentrations of flies; experimental observations have shown that the concentration of these areas increases the risk of degradation of olive trees. For this reason, the risk of the appearance of a plague in an area will increase if the risk of plague also increases in a proximal area. In the proposed system, each sensor collaborates with neighboring nodes to produce a more accurate and reliable alert status. Each node has an embedded cooperative algorithm (a collaborative FRBS) that uses local observations to infer its local output and the perceptions from its neighbor's alert to infer the alert status of its area. To facilitate the model, a collaborative system composed of two FRBSs was embedded in each sensor (Figure 4). The first FRBS has two inputs: the local humidity and temperature; and one output: the local alert status. The second takes this local alert status in addition to the neighbors' alert status as inputs, and produces the alert status as output. If the alert status produced surpasses a certain threshold (e.g., 0.75), indicating a risk of pest appearance, the suitability of insecticide treatments applications should be evaluated. The KB that generates the local alert status (local knowledge) is composed of two input variables (temperature and humidity), one output fuzzy variable (local alert status), membership functions (Figure 5) and the RB (Table 1). Figure 4: Inner structure of collaborative knowledge-based system. The KB that generates the alert status (collaborative knowledge) is composed of two input variables (the local and neighbor's alert status), one output fuzzy variable (alert status), membership functions (Figure 6) and the rule base (Table 2). \begin{table}
\begin{tabular}{|c|c|c|c|c|c|} \hline _Alert_ & \multicolumn{5}{|c|}{_Temperature_} \\ \hline \multirow{5}{*}{_Humidity_} & & VL & L & M & H & VH \\ \cline{2-6}  & VL & VL & VL & L & M & VL \\ \cline{2-6}  & L & VL & L & M & M & VL \\ \cline{2-6}  & M & VL & M & H & H & L \\ \cline{2-6}  & H & VL & H & VH & H & L \\ \cline{2-6}  & VH & VL & H & VH & VH & L \\ \hline \end{tabular}  
VL: Very Low; L: Low; M: Medium; H: High; VH: Very High  
\end{table} 
Table 1: Base of rules used in the local FRBS. Figure 5: Membership functions of the inputs and output variable fuzzy sets (local knowledge). Figure 6: Membership functions of the inputs and output variables fuzzy sets (collaborative knowledge). The collaborative scheme was developed in Java (J2 ME) for embedding in a Sun SPOT sensor. However, since the objective of this experiment is to evaluate the effects of the collaborative scheme on the sensor model surface, a wide set of system states, defined by the values of the temperature, humidity and neighbor alert status, is needed to generate the surfaces. Therefore, this experiment was carried out on a computer (with the same collaborative scheme designed for the sensors) in order to facilitate manipulation of the values of the variables. In order to test the viability of the proposed approach, a comparative analysis of the sensor behavior is shown for four different situations: sensor nodes with a local knowledge only-based system (Figure 7a), sensor nodes with a collaborative knowledge-based system with low (Figure 7b), medium (Figure 7c) and high (Figure 7d) values of the number of neighbor sensors with an alert status above 0.75.