Wireless sensor network (WSN) is one of the major emerging fields in real-time scenarios due to the features of sensors. Sensors are used in remote areas because of their usability. Energy is the major issue to be addressed in sensor networks. This energy affects the entire network lifetime. To resolve the energy issues of WSN, clustering and proper routing are the two major procedures that have to be focused on. In this paper, hierarchical routing with optimal clustering using a fuzzy system (HROCF) is proposed for network lifetime enhancement in WSNs. This proposed scheme uses two phases: selection of a cluster leader with a fuzzy inference system and the hierarchical routing strategy are implemented for routing to consume the energy of the sensors resourcefully. During the first phase, a proper cluster leader can be nominated through the fuzzy inputs, namely: residual energy, cost, and position. In the second phase, hierarchical routing can communicate the information from the lower region to the sink node through the cluster leaders in higher regions. These two phases help to prolong the lifetime. The simulation analysis demonstrates that the HROCF scheme reduces the overall energy spent in the network and supports an increase in the lifespan in terms of more alive sensors compared to the existing schemes.

1. Introduction

Recent advancements in new era technology mostly belong to wireless communication. Sensors play an important part in wireless data transfer. While placing these sensors in an isolated area, continuous monitoring is not possible due to energy constraints. Hence, energy can be used effectively. In general, a sensor device contains sensing, processing, a transceiver, and a control element. A sensing unit is used to sense information from the surroundings. In the processing unit, the incoming data can be processed. In the transceiver unit, the data is transmitted and received from other nodes. The control unit helps to control all other units. This scenario is depicted in Figure 1 [1]. The sensor node has physical characteristics that include size, cost-effectiveness, and it can be easily deployed. The role of the sensor is to observe the environmental surroundings and accumulate information for the end node. Most of the WSN application examples utilise a huge number of sensors.

Hence, managing these large numbers of sensors requires an efficient, well-organized algorithm for improving the network lifetime, security, effective data transmission, and so on. The traditional schemes involved in WSN are unable to respond to the dynamically changing network. Wireless sensor networks are used in dynamically changing environments that can change rapidly over time. The dynamic behaviour of sensors is still a major challenge for data routing, energy constraints, coverage, link quality, and quality of service. Clustering is important with the proper balance of the cluster load to improve the sensor energy value. To achieve this, periodical clustering can be used. Hierarchical routing can be implemented to decrease the total energy ingestion to improve the lifetime.

The motivation of this research is to enhance the lifetime of the sensors in real-time scenarios. Sensors have a limited lifespan due to energy constraints. In order to improve the lifespan of the sensors, hierarchical routing with optimal clustering using the fuzzy system (HROCF) protocol is proposed.

The major contribution of this research (hierarchical routing with optimal clustering using the fuzzy system) is explained as follows:(i)HROCF constructs the cluster with a cluster head and cluster members based on the residual energy, communication cost, and the node position with an appropriate load balancing scheme.(ii)A hierarchical based routing can be implemented for the data gathering process (either interclustering or intraclustering).(iii)The collected data can be forwarded to the base station through the cluster heads.

This article is divided into six sections. Section 2 explains the investigations into the proposed field, which focuses on clustering, fuzzy systems, routing, and its importance. The system model is defined in Section 3. Section 4 describes hierarchical routing with optimal clustering using the fuzzy system (HROCF) scheme. Section 5 illustrates the proposed HROCF performance and validates it with existing approaches. At last, Section 6 presents the conclusion and future enhancements.

2. Literature Review

The issues related to various categories of WSN are discussed in [1]. The major issues are platform and operating systems, communication protocol stack, deployment, and network services. To overcome these issues, various routing protocols need to be designed. A basic clustering technique called the low energy adaptive clustering hierarchy (LEACH) protocol is proposed [2]. This picks up the cluster leader in a random rotation to equally allocate the load among the sensors [3, 4]. Cluster leader selection is made with the energy prediction scheme with fuzzy logic [5].

The author [6] implemented the fuzzy system with three parameters, namely node density, centrality, and residual energy, to choose a cluster head. The above combinations of inputs are given to the fuzzy system by the above parameters, and the output is the cluster head selection probability. A protocol is proposed [7] to find a cooperative node to join in the cluster. The PSO technique helps to determine the route from a cooperative node to the cluster head. This cluster head mainly depends on residual energy, network load, and signal to interference plus noise ratio. The next node energy level is referred to as backup cluster heads (BCHs). A member node always confirms in a cluster that there is always a BCH [8].

A new clustering using fuzzy descriptors is proposed. The supercluster head is chosen from the fuzzy inputs [9]. A fuzzy type-2 model for lifetime enhancement in sensor networks is utilized. The cluster head node can be referred to as the confidence factor [10]. The cluster head is the output of the fuzzy system with various inputs [1117]. The author developed a new scheduling scheme to avoid the drawbacks of the reclustering method. A hyper round can be calculated with fuzzy inputs [18, 19]. The author [20] uses a greedy algorithm for the proposed protocol, forms clusters, and establishes links based on the Hamilton path for routing. This protocol designs the minimal cluster size, which ensures that the data transmission delay to the base station was reduced.

An associated scheme of clustering and load balancing methods to save the sensor energy level has been developed [21]. The author [22] uses a sleeping and waking scheme to increase energy efficiency [23] through an enhanced clustering hierarchy methodology in WSNs. Here, the lifetime can be enriched by reducing the redundancy from overlapping nodes in the clustering [2427]. Nodes that are not engaged in sensing tasks are kept in sleep mode to conserve energy [28], thereby improving network lifetime [29, 30].

3. System Model

The approaches that used in the HROCF scheme are:(1)All the sensors are arbitrarily distributed in an X-Y plane.(2)The sensors are similar in processing and communicating with other devices.(3)There is no provision to recharge the sensors.(4)The energy remains equal for transmitting and receiving the same amount of data.(5)Cluster Leaders (CL) can be periodically rotated for energy level balancing.

Table 1 explains the parameters used in the simulation environment.

Energy needed for transmission and reception ‘l’ bits of data to distance “d” from (1) and (2) iswhere  = Energy spent for transmitting and receiving per bit.

The value of “d0” is estimated from (3) as

4. Proposed Method

The HROCF protocol operates in three segments. The first segment refers to clustering, the second segment refers to hierarchical path establishment, and the third part indicates data transmission. The term “Round” can be defined as the consecutive time across two cluster leaders. Round comprises of set-up and steady-state-phase. A cluster leader selection is made in the set-up-phase using a fuzzy system. At the steady-state phase, data is transmitted from cluster members to cluster leaders. This process is carried out in both the lower regions and also in all the higher regions. Additionally, the cluster leaders in higher regions accumulate the data from the cluster leader in the lower region and forward it to the cluster leader in the next higher region, and finally, to the base station.

4.1. Operation of Rounds

Algorithm for operation of rounds is as follows: (Algorithm 1)

For Each Round
  For set-up-phase
   Form the nodes group
   Elect the optimal CL using FIS
  End For
  For steady-state-phase
   Collect data from CM to CL in lower and higher regions.
   Data transmission from lower region CL to higher region CL.
   Aggregate CL data and route to BS
   End For
End For

The proposed system uses the Mamdani fuzzy inference system for selecting cluster leaders. This uses three inputs, namely: residual energy, cost, and position. One of the input functions named residual energy uses five linguistic variables such as very low (VL), low (L), medium (M), high (H), and very high (VH). The functions VL and VH use trapezoidal membership functions, and the other function uses triangular membership functions, respectively.

The other two inputs of the fuzzifier are the cost and the position (location) of the sensor nodes. The cost function uses three linguistic variables. They are small (S), intermediate (I), and large (L). The variables small (S) and large (L) use trapezoidal membership functions, and the variable Intermediate (I) uses triangular membership functions, respectively. The fuzzifier input position (location) uses three linguistic variables, namely, near, average, and far. Near and far variables use the trapezoidal function, and the linguistic variable average uses the triangular membership function. During the defuzzification process, the Centre of Area (COA) method is used.

Residual energy or remaining energy can be defined as the unspent energy in the sensor nodes. The term “cost” denotes the overall number of nodes involved in collecting information from the member nodes through intermediate nodes in a cluster. The position of the sensor depends on the location of the sensors. This is illustrated in Figure 2.

The fuzzy membership function weights can be represented in the following equation:where x, y, z are the membership function vertices.

Table 2 denotes the Cluster Head (CH) selection process using various Fuzzy Membership Functions.

4.2. Hierarchical Based Routing

This hierarchical routing scheme involves two stages. Depending on residual energy, cost, sensor position, clusters are formed, and a cluster leader can be elected with a fuzzy system in the first stage.

Data gathering takes place in two steps:

4.2.1. Intercluster Data Gathering (Inter_CDG)

This Inter_CDG scheme refers to data collected from all the members of the cluster leader node. This node accumulates data from the cluster members. To avoid collisions in the data collection process, time division multiple access (TDMA) is used. The sensed information can be collected within the allocated time interval from all the members to the leader node.

4.2.2. Intracluster Data Gathering (Intra_CDG)

This Intra_CDG scheme collects information from the lower region cluster leader to the upper section cluster leader towards the base station/sink node. It is possible to have a collision due to simultaneous transmission from lower region cluster leaders. Hence, the Code Division Multiple Access (CDMA) technique helps collect the gathered information from the lower region cluster leader to the higher region cluster leader. Then, the gathered information can be forwarded to the end node. The cluster leaders located in the upper region can be selected based on the shorter distance. The distance between these two cluster leaders can be calculated using

Also, consider that the higher region has more cluster leader nodes. The cluster leader in the lower region selects the higher region cluster leader with the shortest distance. It will check the distances of both the cluster leaders’ distances. After calculating the distance, the data can be passed to the next higher region level using the shortest distance, which can be evaluated using (5).

4.3. Hierarchical Data Transmission

The entire network is separated into certain regions. Group the nodes and form the cluster. Elect a cluster leader and a cluster member through an Algorithm 2.Regions: Lower Region (LR), Higher Region 1(HR1), Higher Region 2(HR2),… Higher Region n (HRn).Higher region:N ⟶ Total Clusters.M ⟶ Total member nodes.Cluster Leader: CL1, CL2, CL3….CLNCluster Members: CM1, CM2, CM3…CMM

RE-Residual Energy/Remaining Energy
IE-Node Primary Energy
N: Total Nodes in the Network
X_Coordinate: Area of x-axis
Y_Coordinate: Area of y-axis
TC: Total Clusters
C = {C1, C2, C3, C4, … CTC}
R: Number of Rounds.
CL={CL1, CL2, CL3, CL4……. CLTC}, the Cluster Leaders in the Cluster
Residual Energy (Unspent energy)
Position (X_Coordinate, Y_Coordinate)
Communication_Cost (Distance between the nodes)
Fuzzy logic (Residual Energy, Communication_Cost, Position)
(1)Initially, random selection of cluster leader.
(2)Each node,
   if (RE<IE), then,
    if (node not reaches the other node withinmaximum hop count of 2), then,
     if (node is not located at minimum distance with certain (other) nodes), then,
(3)Fuzzy input variables: Residual_Energy, Communication_Cost and Position.
(4)Determine the Defuzzifier output variable named Cluster Leader for eachdepends on the linguistic variables
(5)Select nodes nithe highest possible Cluster leader cost from all the nodes from previous round (R) elected cluster leader.
(6)Repeat the procedure from step 1 to 4 for all the regions.
(7)Form the clusters, C={C1, C2, C3, C4…. CTC} by connecting each nodeto the nearer cluster leader on the corresponding regions.

Consider that the cluster leader located in the higher region is denoted as CL1 and the cluster leader in the lower region1 is denoted as CL11, and the lower region2 cluster leader is represented as CL111. This can be clearly illustrated in Figure 3. Assume all the sensors are connected to a cluster leader with a maximum of two-hop counts. Cluster members can route the sensed data to the cluster leader. If it is located within a single hop distance, the cluster member can route data to the cluster leader directly.

If the cluster leader is not located at a single hop from the cluster member, it can route the information to the other member within the cluster, which is nearer to the leader node. Then the corresponding cluster member sends information to the cluster leader. The leader node in the higher region has to get the data from all the cluster leader nodes in the lower region. These nodes finally route the packets to the sink node. This is the case where a sink node is present at a corner in the geographical zone. If the sink node is positioned at the mid-point area, all cluster leader nodes that are nearer to the sink can accumulate the data packets from the scattered nodes located at the corners. Cluster leaders can transfer data to the higher region based on the shortest distance in the lower region. The following example can explain this. Let us consider the higher region cluster leaders are CL2 and CL3 in lower regions; the cluster leader CL21 accumulates all the data from the member nodes. Now, the lower region leader node can check the distance between CL2 and CL21. Also, it finds the distance between CL3 and CL21. The data can be routed to the cluster leader from these two distances, which has the shortest distance.

5. Results and Discussion

The performance metrics like network lifetime, residual energy, and packet delivery ratio are evaluated, simulated, and compared with the HROCF with the existing schemes. The round at the time of the death of the first node, 50% death node, and the death of the last node in the network are referred to as First Node Dies (FND), Half Node Dies (HND), and Last Node Dies (LND).

5.1. Network Lifetime

Figure 4 represents the lifetime of the nodes with rounds. The results show that the proposed HROCF has a higher network lifetime compared with LEACH, LEACH-FC, and FBECS schemes in FND, HND, and LND.

5.2. Number of Alive Nodes and Dead Nodes

Alive nodes represent the active nodes in the network environment. Based on energy-dependent, the nodes can be alive until the sensor energy level expires. Initially, 100 nodes are deployed randomly. When the round value increases, the sensors start to lose their energy value. At one time instant, the sensor energy value reaches zero, which can be called as “dead node”. Figure 5 denotes the comparison of more alive nodes of HROCF with the existing LEACH, LEACH-FC, and FBECS. In the proposed approach, energy savings can be attained by proper selection of the leader node with a fuzzy system and proper hierarchical routing to the sink node. As shown in Figure 5, more alive sensors are more in the HROCF scheme than in the existing approaches.

Figure 6 indicates the dead sensors for the proposed optimised clustering and routing approach help to prolong the network lifetime.

5.3. Residual Energy and Energy Consumption

In Figure 7, the y-axis signifies the average remaining energy, and the x-axis indicates the number of rounds. The maximum energy of the network is specified as 200 joules due to the 100 nodes in a network having 2 joules each (100 nodes ∗ 2 Joules = 200 Joules of energy). The network lifetime depends on the more alive nodes. This node can be alive until the energy of the sensor remains present (i.e., till it reaches zero). Energy can be consumed for data sensing, transmission, and reception. Once the sensor is placed in the field for sensing, it gradually decreases its energy level. Hence, it can be used in a very effective way to improve the lifetime of the network. Our proposed scheme consumes very little energy compared to the LEACH, LEACH_FC, and FBECS schemes. In HROCF, optimal clustering and hierarchical routing help save the sensor’s energy, leading to lifetime improvement in sensor networks.

Total Energy consumption of the node = ETX + ERX + ES

Where, ETX—Energy necessary for transmitting data. ERX—Energy necessary for receiving data. ES—Energy necessary for sensing data.

The above Figure 8 indicates the total energy consumed by the sensor node for the number of rounds. It is clear that as the number of rounds increases, the network’s total energy consumption also increases. At the range of 1000–2000 rounds, the energy consumed by the sensor is at its maximum. Because of proper cluster selection and the employment of hierarchical routing, the proposed HROCF approach consumes less energy than the other schemes.

5.4. Packet Delivery Ratio

One of the major metrics to calculate the network efficiency is the packet delivery ratio. This helps to analyse the packets that reached the sink node successfully. It can be described as the ratio between the number of successful packets that reached the end node and the total packets sent by the sender node. The packet delivery ratio is high, implying that the maximum sensed information has reached the destination with minimal packet loss. It is impossible to obtain a 100% packet delivery ratio with the network.

Figure 9 implies the HROCF scheme has a more efficient packet delivery ratio than LEACH, LEACH_FC, and FBECS schemes. It is because of the proper cluster head selection and hierarchical routing employed in the simulation environment.

6. Conclusions and Future Work

Lifetime enhancement is the major issue in designing an efficient routing strategy in WSNs. Many clustering and routing schemes have been proposed to solve this problem, which has already been discussed in the literature. This proposed method selects the cluster leader through the fuzzy inference system by considering residual energy, cost, and position for optimal clustering. Also, in the second phase of this proposed work, hierarchical clustering comprises two phases, namely, Inter_CDG and Intra_CDG, which help route the data from lower region cluster members to the base station through the higher regions. Simulation outcomes reveal that the proposed hierarchical routing with optimised clustering using the fuzzy system (HROCF) scheme has better network lifetime, alive nodes, energy, and packet delivery ratio than the LEACH, LEACH-FC, and FBECS approaches. In future work, we will adapt this technique to mobile wireless sensor nodes.

Data Availability

The labelled dataset used to support the findings of this study is available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.