## 3 The Proposed Fuzzy Model and WSN Clustering Technique
### Linguistic Variables' Measurement and Normalization  
The lifetime of the WSN is considerably influenced by the technique used for CH election, which in turn is influenced by many factors. These factors are expressed in the context of fuzzy logic as linguistic variables. Five linguistic variables are involved in the proposed fuzzy controller. They influence the network lifetime directly or indirectly by one of three aspects: energy consumed by CHs, total energy consumed by non-CH nodes (local consumed energy), or the distribution of energy consumption loads through sensor nodes. The Min-Max normalization technique [53; 54; 55] (depicted in Equation (1)) is adopted for relative scaling of linguistic variables' values. The values are calculated relative to a universe of discourse of zero and 100 according to their positions between minimum and maximum values. Finally, the sensor node values of a given variable are scattered along the universe of discourse according to their relative positions. Thus, the values of a given variable are normalized because they are required to assign the sensor node of maximum value with the highest priority to become a CH. The rest of the sensor nodes are prioritized according to their relative occurrences between the maximum and minimum variable values. \[Normalized\ (var)=\frac{Value(var)-Min(var)}{Max(var)-Min(var)} \tag{1}\]  
where \(Value(var)\) is the given value of the given variable for the given current node and \(Min(var)\) and \(Max(var)\) are the minimum and maximum values of the given variable among all sensor nodes, respectively. Note that in the calculation of any linguistic variable for a particular sensor node, any surrounding sensor nodes closer to a pre-selected CH must be excluded. This is because they will not become members of this node's cluster in case it was elected. Figure 1: Fuzzy system control model. The following are the linguistic variables used in our proposed system:  
1. **Remaining Energy:** Selecting sensor nodes with higher energy as CHs improves network lifetime by balancing energy consumption through the WSN's nodes. _Energy_ is normalized by Equation (1), where \(Value(var)\) is _Energy_ of the current node and \(Max(var)\) and \(Min(var)\) are the maximum and minimum values among all candidate nodes, respectively. Hence, the normalized _Energy_ will be zero for the node with the lowest remaining energy and 100 for the node with the highest remaining energy. The normalized _Energy_ values for the rest of nodes are between zero and 100 according to their relative position between the highest and the lowest _Energy_ values. 2. **Distance from the BS:** The lower the distance between CHs and the BS, the lower the consumed energy. Sensor nodes closer to the BS have to be given higher opportunities to be CHs over farther ones. _BS_Distance_ is normalized as a percentage value to the distance between the furthest candidate node and the BS using Equation (1), where Max is the distance from the BS to furthest candidate node, Min is the distance of the nearest node to the BS, and Valueis the distance of current node from the BS. For example, if the _BS_Distance_ of the farthest node from the BS is 80 m, the _BS_Distance_ of the closest node to the BS is 30 m, and the _BS_Distance_ of current node is 50 m, then the normalized _BS_Distance_ of the current node is: \[Normalized(BS\_Distance)=\frac{50-30}{80-30}\times 100\%=40\%\]
3. **Location suitability:** This criterion measures how suitable a node location is as a CH with respect to surrounding nodes within a predefined range. A more suitable location for a CH node is a location with lower total communication energy. Location suitability for any node is measured by averaging the energy consumed locally by the sensor nodes located around the current node within a pre-defined range.