Fuzzy Based BEENISH Protocol for Wireless Sensor Network

The main parameter to be considered in the wireless sensor network is the amount of energy that is available in each sensor node. The lifetime of the sensor node (SN) depends on it. As the SNs are deployed in remote locations, if the entire energy is consumed, it would be very difficult to replace or recharge the energy source immediately. Hence the energy consumed by each node is very important. If individual SNs send information directly to the base station (BS), then the availability of energy in such SN decreases very fast. This will lead to reduction in the life time of the SN. Instead, the SNs can send the data to the cluster head (CH), then the CH consolidates the received data. The CH sends it to the BS periodically. In this way, utilizing CH for sending the information to the BS increases the lifetime of the SN. The cluster head selection is very crucial in such networks. This paper proposes a novel fuzzy based BEENSIH protocol for CH selection.


Introduction
WSN consists of a number of sensor nodes working together in a particular area in order to obtain data from the surroundings [1].Two types of sensor networks are available.Based on the types of sensors utilized in the network, the wireless sensor network may be homogeneous wireless sensor network and heterogeneous wireless sensor network.Wireless sensors are small in size when compared to the traditional sensors.The processing and computing resources are also small.The cost of wireless sensors is cheap when compared to traditional one.Sensor nodes are small in size.It consists of sensing, data processing and communicating components.A sensor network is composed of a large number of sensor nodes which are densely deployed either inside the location where the operation is being performed or very close to it.The sensor nodes are randomly deployed.Unique feature of the sensor network is the cooperative effort of sensor nodes.The SN protocols and algorithms must possess self-organizing capabilities [2].Sensor nodes are fitted with an onboard processor.Instead of sending raw data to the nodes responsible for fusion, they use their processing abilities to locally carry out simple computations and transmit only the required and partially processed data.Sensor nodes are prone to failures.Sensor nodes mainly use a broadcast communication paradigm and they may not have global identification.The topology of the sensor networks changes very frequently [3].The purpose of deploying sensor nodes is to monitor some important parameters in that area.SN consists of a sensing element for sensing, signal conditioning element for processing the sensed parameters, transmission element for conveying the processed information either to CH or to the BS, and power supply unit for the operation of the sensor node.Figure 1 shows the structure of sensor node, Figure 2 shows the formation of clustering in a Wireless Sensor Network.

Heterogeneous Clustering Protocols
There are many types of heterogeneous clustering protocols.They are as follows.

Stable Election Protocol
Performance of the clustering protocols can be analyzed with the help of the parameters like stability period, instability period, number of cluster heads per round, number of alive nodes per round.Stable and unstable region are available in any WSN.In the unstable region, if one node starts dying the remaining nodes present in the region also started dying thereby the stability of the WSN has been disturbed.But in stable region, if one node starts dyeing, the remaining nodes present in the cluster continue to be alive, thereby the stability of the cluster continues.By implementing Stable Election Protocol (SEP), the stability of the cluster has been improved with the help of the parameters like excess energy faction that is available between normal and advanced nodes (α) and the portion of advanced nodes (m).In order to achieve the stability in the cluster, the energy consumed by the SNs has to be balanced [4]- [6].
Two types of nodes are available in SEP.They are normal nodes and advanced nodes.The energy level present in the advanced nodes is high when compared to the energy level present in the normal nodes.The probability of the selection of the CH depends on the amount of energy level present in the sensor node.Therefore for the advanced nodes the probability of becoming the CH is more when compared with normal nodes.SEP has been implemented for two level heterogeneous WSN, i.e. two levels of energy (high energy level, low energy level ) has been considered.
If the sensor nodes posses different energy levels (low energy, medium energy, high energy) then Distributed Energy Efficient Clustering (DEEC), Enhanced Distributed Energy Efficient clustering (EDEEC) protocols are used.For DEEC, EDEEC, the nodes have been identified as Normal nodes (low energy level), advanced nodes (medium energy level) and super energy nodes (high energy level).

Distributed Energy Efficient Clustering (DEEC) Protocol
The cluster head (CH) selection in DEEC utilizes the amount of energy level available in that node.For calculating the energy level of the node, the initial energy level and residual energy level parameters have been considered.In DEEC two types of nodes are available.They are normal nodes and advanced nodes.The advanced nodes possess higher energy level when compared to the normal nodes.Therefore the possibility of selection as CH is more for advanced nodes than normal nodes.After some rounds, the advanced nodes lose some of the residual energy level.Due to this condition; the lifetime of the CH node is reduced very fast.This drawback has been overcome in Developed distributed energy efficient clustering (DDEEC) protocol [7] [8].

Developed Distributed Energy Efficient Clustering (DDEEC) Protocol
The nodes available in DDEEC are the same as in DEEC.In DDEEC, a threshold limit has been set for the node which is acting as a CH.After some rounds when the advanced node (which is acting as a cluster head) reaches the threshold limit (i.e. after the reduction in the amount of residual energy level) that CH node has been converted to normal node, then another advanced node has been acting as new CH.Thereby the early death of the advanced node (which acts as CH recently) has been prevented.Due to this threshold limit checking, all the advanced nodes available in that sensor network will have the chance of operating as a CH [9].

Enhanced Developed Distributed Energy Efficient Clustering (EDDEEC) Protocol
The level of heterogeneity in EDDEEC is three, i.e. three types of nodes are available in EDDEEC.They are normal nodes, advanced nodes and super nodes.The super nodes posses' highest energy level when compared to normal and advanced nodes.In EDDEEC, the selection of CH is based on the amount of absolute energy level (T absolute ).If the node posses the energy level that is less than the T absolute , then chances are less for that node to be selected as CH.In general normal and advanced nodes posses the energy level that is below T absolute ).Due to this reason, the chance for the selection of CH is more for super nodes when compared to other nodes.Now one super node which posses the energy level above the T absolute , then that node acts as CH.After some rounds the energy level of the CH node starts decreasing and at one particular stage if the energy level of the CH reaches below T absolute .Now the existing CH node is not eligible for acting as CH.The chance of acting as CH then goes to some other super node which posses the energy level above the T absolute .Thereby balance in the energy level of the super nodes continues.This leads to prevent the early die of the super node which is acting as CH [10] [11].

Balanced Energy Efficient Network Integrated Super Heterogeneous Clustering (BEENISH) Protocol
For four level of heterogeneity is being utilized in BEENISH protocol.Here, based on the energy level, the nodes have been classified as Normal nodes (low energy level), advanced nodes (medium energy level) super nodes (high energy level) and ultra super nodes (highest energy level) [12].In general ultra super nodes have the highest chance for the selection of cluster head.The first node dies very late when compared to other protocols (DEEC, DDEEC, EDEEC).Due to this reason the lifetime of the BEENISH protocol has been extended.The efficiency of this BEENISH protocol is highest when compared to DEEC, DDEEC, EDEEC protocols.The number of packets sent to the base station is also high.Let us consider r i the number of rounds for a node (SN) to become as cluster head.This is referred to a rotating epoch.The amount of energy consumed by the cluster head is more when compared to the other nodes that are available in that cluster.The CH selection in heterogeneous sensor network is different from the homogeneous sensor network based on the energy level; the ultra-super node has highest chance for the CH selection.Table 1 shows the comparison of these clustering protocols.

Existing Cluster Head Selection in BEENISH protocol
The nodes available in BEENISH protocol include normal nodes, advanced nodes, super nodes, and ultra super nodes.Ultra super node possesses highest energy level, while normal node possesses lowest energy level.The chance for the selection of the cluster head (CH) is very high for ultra super node.The average energy of each node has been determined with the help of the following equations In BEENISH, average energy of r th round can be obtained as follows and as supposed in DEEC: ( ) ( ) R is showing total rounds from the start of network to the all nodes die and can be estimated as in DEEC and given as under: The life time of the DDEEC is less when compared with EDEEC protocol The life time of the EDEEC is less when compared with BEENISH protocol

Extended lifetime among all heterogeneous protocols
The efficiency of DEEC is less when compared with DDEEC The efficiency of DDEEC is less when compared with EDEEC The efficiency of EDEEC is more when compared with DDEEC

Most efficient heterogeneous clustering protocol
The number of packets sent to the BS is between 2 × 105 to 2.5 × 105 The number of packets sent to the BS is between 1 × 105 to 1.5 × 105 The number of packets sent to the BS is between 2 × 105 to 2.5 × 105 The number of packets sent to the BS is between 4 × 105 to 4. E round is the energy dissipated in a network during single round.
To achieve the optimal number of CH at start of each round, node s i decides whether to become a CH or not based on probability threshold calculated by expression in the following equation, ( ) where G is the set of nodes eligible to become CH.If a node s i has not been CH in the most recent n i then it belongs to set G. Random number between 0 and 1 is selected by nodes belonging to set G. If the number is less than threshold T(s i ), the node s i will be CH for that current round.
Threshold is calculated for CH selection of normal, advanced, super and ultra-super nodes by putting above values in equation below:

Fuzzy Logic Based Cluster Head Determination
Fuzzy sets had been published by Lotfi A. Zadah of university of California in the year 1965.These fuzzy sets formed the basis for fuzzy logic.With the help of fuzzy logic, it is easy to implement real time scenario.This can be done by utilizing less expensive microcontrollers.The purpose of fuzzification is to convert the input values into fuzzy values.The rule evaluation module calculates the input real values to the corresponding output fuzzy values.The defuzzification module converts the output real values into appropriate output values [13].
Before implementing the fuzzy logic, the following assumptions are to be made.1) The cluster head election should be done by the base station (BS).
2) The base station should be in static condition.BS should not move from one location to another.
3) The location of the nodes has to be conveyed to the BS. 4) The channel used for propagating the information is in symmetric form.
5) The energy level of the nodes also has to be intimated to the BS.This can be done during the setup phase of the cluster formation.6) The distance between the BS and the nodes should be large.7) The nodes that are present in the WSN should be homogeneous in nature (i.e.nodes have identical characteristics).The algorithm adapted in the FL scenario is similar to the centralized approach, i.e. decision has been taken by the base station alone.In order to implement this, the base station possesses more energy, power, as well as memory capacity when compared to the other nodes [14].Figure 3 shows the Implementation of cluster head determination using Fuzzy Logic.
Mamdani method of Fuzzy Inference System (FIS) has been adapted here.The fuzzy logic control model consists of fuzzifier module, fuzzy rules module, fuzzy inference module, and a defuzzifier module.Three main input variables like energy dissipation rate of the node, packet loss and distance from the base station have been considered here for the determination of cluster head.For analysis purpose here the fuzzy subsets (related to these fuzzy main input variables) have been considered.For the first fuzzy input variable energy dissipation rate, the fuzzy subsets like low energy dissipation rate, medium energy dissipation rate and high energy dissipation rate have been considered.Similarly for the second fuzzy input variable packet loss, the fuzzy subsets like low number of packet loss, medium number of packet loss and high number of packet loss parameters are considered.We have three fuzzy subsets for the third input (distance) far distance, medium distance and near distance BS (related to BS) are considered.With the help of these fuzzy subsets, IF-THEN rules are applied in order to determine the output [15].Here the fuzzy output variable is considered to be selection of cluster head (CH) among  the nodes that are available in that cluster.For cluster head selection output variable, the fuzzy subsets like low, medium, high and highest are considered.To be a CH, the node should posses low energy dissipation rate, low number of packet losses, and distance from the base station should be near.Figure 4 shows the fuzzy logic designer for cluster head selection.Figure 5 shows the membership function for the input variable dissipation rate.Figure 6 shows the membership function for the input variable packet loss.Figure 7 shows the membership function for the input variable distance.Figure 8 shows the Rule editor for CH selection.Tables 2-4 show the Rule base for energy dissipation rate low, medium, high respectively

Proposed Algorithm for the Cluster Head Determination in BEENISH Protocol
Step 1: Check whether the node possess highest energy level.If yes, then go to step 5 or go to step 6.
Step 2: Now check if the same node possesses low number of packet loss.If yes then go to step 5 or go to step 6.Step 3: Now check if the same node also possesses low energy dissipation rate.If yes, then go to step 5 or go to step 6.
Step 4: Now check if the same node also possesses nearer to the base station (distance between BS and SN should be near).If yes, then go to step 5 or go to step 6.
Step 5: Select the node which possesses highest energy level, low number of packet loss, low energy dissipation rate, and nearer distance to the base station as cluster head.
Step 6: Need not select the node which possesses low energy level, high number of packet loss, high energy dissipation rate, and far distance from the base station as cluster head.That node will not compete for cluster head selection.
Step 7: Now check the energy level of Cluster head (selected recently), then go to step 1.

Simulation and Results
The Fuzzy based BEENISH protocol is simulated with the help of MATLAB and fuzzy logic and the corresponding results are shown below.Figure 9 shows the surface viewer for CH selection.Figure 10 shows the rule viewer for CH selection.5.
The parameters to be chosen for comparison are, packets delivered and distance travelled.As already mentioned, two hop communication has been chosen for transmission purpose.The packets delivered by the fuzzy based BEENISH protocol are comparatively higher than the ordinary BEENISH protocol for each and every transmission, and the distanced travelled is comparatively lower.As the distance travelled is less, then the path loss will be less.

Conclusion
By adapting this fuzzy based BEENISH protocol, the lifetime of the ultra-super node gets maintained, i.e. in     this protocol, the energy level of the CH is maintained.If the energy level of the CH node decreases, then the node with another higher energy level is considered for cluster head.Thereby the energy consumed by the CH is maintained.The fuzzy based BEENISH protocol shows better performance when compared to the ordinary BEENISH protocol based on number of packets delivered to the base station.It also enhances fast transmission.

Figure 1 .
Figure 1.Structure of basic sensor node.

Figure 2 .
Figure 2. Formation of clustering in a wireless sensor network.
5 × 105 Good stability (based on the death of first node ) Good stability (based on the death of first node) Better stability (based on the death of first node) Best stability (based on the death of first node)

Figure 3 .
Figure 3. Implementation of cluster head determination using fuzzy logic.

Figure 5 .
Figure 5. Membership for the input variable-dissipation rate.

Figure 6 .
Figure 6.Membership function for the input variable-packet loss.

Figure 7 .
Figure 7. Membership function for the input variable-distance.

Figure 11 (
a) shows the transmission between single sensor node and Base station in two hops for fuzzy based BEENISH protocol.Figure11(b)shows the transmission between single sensor node and Base station in two hops for ordinary BEENISH protocol.Figure12shows the transmission between multiple sensor node and Base station in two hops for ordinary BEENISH protocol.The comparison between ordinary BEENISH protocol and fuzzy based BEENISH protocol is shown in Table

Figure 9 .
Figure 9.The surface viewer for cluster head selection.

Figure 10 .
Figure 10.The rule viewer for cluster head selection.

Figure 11 .
Figure 11.(a) The transmission between single sensor node and Base station in two hops for fuzzy based BEENISH protocol; (b) The transmission between single sensor node and base station in two hops for ordinary BEENISH protocol.

Figure 12 .
Figure 12.The transmission between multiple sensor node and Base station in two hops for fuzzy based BEENISH protocol and ordinary BEENISH protocol.

Table 1 .
) Comparison between the heterogeneous protocols.

Table 2 .
Rule base with energy dissipation rate-low.

Table 3 .
Rule base with energy dissipation rate-medium.

Table 4 .
Rule base with energy dissipation rate-high.

Table 5 .
Comparison of fuzzy based BEENISH protocol with ordinary BEENISH protocol for single transmission.