# FuGeF: A Resource Bound Secure Forwarding Protocol for Wireless Sensor Networks
## 4 The Proposed FuGeF Protocol
### Fuzzy Logic System (FLS) Design in FuGeF  
FLS stems from Computational Intelligent Systems (CIS) which are emerging technologies that can be merged with most existing systems to improve performance. These systems possess adaptive mechanisms that are capable of enabling intelligent behavior in complex and unstable environments [32]. Thus, the nature of sensor node deployment in inaccessible environment together with its resource constraints (bandwidth, energy, storage) necessitates the need for a lasting collaboration with the CIS. FLS is among the numerous CIS known for its minimal demand of memory and processing power, thereby making it a valuable mechanism for resource bound security solution. Its flexibility to accommodate natural language and logical reasoning (which are of human nature) to match any set of input-output data with minimum processing intelligence, makes it preferable in sensor-based systems since it requires minimum control [33].  
In this paper, the objective of our fuzzy logic routine is to determine the chance value for each node that responds with CTS. The FLS is composed of four main components as shown in Figure 3. We now detail the routine operation of the components.  
* _The Fuzzifier:_ The crisp input values from each responding node (Progressive distance, Remaining Energy, and Link cost) are passed to the Fuzzifier as shown in Figure 3. The Fuzzifier converts the input values into suitable linguistic values by mapping each value into corresponding universal set as shown in Figure 4. For instance, if \(X\) is the universal set, its elements are denoted by \(x\) such that the fuzzy set \(A\) in \(X\) is a set \[A=x,\mu_{A}(x)|x\in X\] (6) where \(\mu_{A}(x)\) is a membership function (MF) of \(x\) in A, the function maps each element of \(X\) to a value between 0 and 1. The value of the membership function is the intersection point of the value of our parameters with the degree of the membership function [34].
* _Fuzzy Inference System (FIS) and Rule Evaluation:_ FIS and rule evaluation components work together. FIS interprets the membership values by applying the IF-THEN rules responsible for network dynamics to obtain the fuzzy output set [35]. The commonly used Mamdani fuzzy inference technique [36] is adopted due to its simplicity to accommodate the 3-input (parameters), to produce 1-output, in the case of each CTS response. All outputs evaluated using the twenty seven (27) IF-THEN rules are gathered and combined to form a new output set.
* _Defuzzifier:_ The Defuzzifier is responsible for converting the fuzzy set outputs back to crisp output, using a process known as Defuzzification. The process employs a centroid based defuzzification technique to map the output set space into the crisp output. The centroid otherwise known as the Center of Area (CoA) uses sub-divided area's center and assigns a particular value based on the overall contribution to infer the CoA [37]. The crisp output is mathematically computed from Equation (7) \[Output=\frac{\int\mu(x)\times xdx}{\int\mu(x)dx}\] (7) where \(\mu(x)\) is the aggregated membership function of the fuzzy set and \(x\) is the output variable. The node with the highest output or chance value is presumed to be the most appropriate node among the received replies.  
Figure 3: Fuzzy Logic System (FLS)