Hierarchical Routing with Optimal Clustering Using Fuzzy Approach for Network Lifetime Enhancement in Wireless Sensor Networks

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.


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 e ectively. 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. e control unit helps to control all other units. is scenario is depicted in Figure 1 [1]. e sensor node has physical characteristics that include size, cost-e ectiveness, and it can be easily deployed. e 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 e cient, well-organized algorithm for improving the network lifetime, security, e ective data transmission, and so on. e 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. e 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. e 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.
e 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) e collected data can be forwarded to the base station through the cluster heads.
is 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. e 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.

Literature Review
e issues related to various categories of WSN are discussed in [1]. e 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]. is 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]. e author [6] implemented the fuzzy system with three parameters, namely node density, centrality, and residual energy, to choose a cluster head. e 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. e PSO technique helps to determine the route from a cooperative node to the cluster head. is cluster head mainly depends on residual energy, network load, and signal to interference plus noise ratio. e 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. e supercluster head is chosen from the fuzzy inputs [9]. A fuzzy type-2 model for lifetime enhancement in sensor networks is utilized. e cluster head node can be referred to as the confidence factor [10]. e cluster head is the output of the fuzzy system with various inputs [11][12][13][14][15][16][17]. e 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]. e author [20] uses a greedy algorithm for the proposed protocol, forms clusters, and establishes links based on the Hamilton path for routing.
is 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]. e 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 [24][25][26][27]. Nodes that are not engaged in sensing tasks are kept in sleep mode to conserve energy [28], thereby improving network lifetime [29,30].

System Model
e approaches that used in the HROCF scheme are:  (1) All the sensors are arbitrarily distributed in an X-Y plane. (2) e sensors are similar in processing and communicating with other devices. (3) ere is no provision to recharge the sensors. (4) e 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) is where E ec � Energy spent for transmitting and receiving per bit. e value of "d 0 " is estimated from (3) as

Proposed Method
e HROCF protocol operates in three segments. e first segment refers to clustering, the second segment refers to hierarchical path establishment, and the third part indicates data transmission. e 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. is 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. Residual energy or remaining energy can be defined as the unspent energy in the sensor nodes. e term "cost" denotes the overall number of nodes involved in collecting information from the member nodes through intermediate nodes in a cluster. e position of the sensor depends on the location of the sensors. is is illustrated in Figure 2.
e 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.

Hierarchical Based Routing.
is 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:

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

Intracluster Data Gathering (Intra_CDG).
is 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. en, the gathered information can be forwarded to the end node. e cluster leaders located in the upper region can be selected based Mobile Information Systems 3 on the shorter distance. e distance between these two cluster leaders can be calculated using Also, consider that the higher region has more cluster leader nodes. e 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).

Hierarchical Data Transmission.
e 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. Consider that the cluster leader located in the higher region is denoted as CL 1 and the cluster leader in the lower region1 is denoted as CL 11 , and the lower region2 cluster leader is represented as CL 111 . is 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.

Mobile Information Systems
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.
en the corresponding cluster member sends information to the cluster leader. e leader node in the higher region has to get the data from all the cluster leader nodes in the lower region. ese nodes finally route the packets to the sink node. is is the case where a sink node is   Figure 3: Hierarchical data transmission from lower region to sink node through higher regions.   Mobile Information Systems 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. e following example can explain this. Let us consider the higher region cluster leaders are CL 2 and CL 3 in lower regions; the cluster leader CL 21 accumulates all the data from the member nodes. Now, the lower region leader node can check the distance between CL 2 and CL 21 . Also, it finds the distance between CL3 and CL 21 . e data can be routed to the cluster leader from these two distances, which has the shortest distance.

Results and Discussion
e performance metrics like network lifetime, residual energy, and packet delivery ratio are evaluated, simulated, and compared with the HROCF with the existing schemes. e 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). Figure 4 represents the lifetime of the nodes with rounds. e results show that the proposed HROCF has a higher network lifetime compared with LEACH, LEACH-FC, and FBECS schemes in FND, HND, and LND.

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. Figure 7, the y-axis signifies the average remaining energy, and the xaxis indicates the number of rounds. e 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). e network lifetime depends on the more alive nodes. is 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.

Residual Energy and Energy Consumption. In
Total Energy consumption of the node � E TX + E RX + E S Where, E TX -Energy necessary for transmitting data. E RX -Energy necessary for receiving data. E S -Energy necessary for sensing data. e 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.

Packet Delivery Ratio.
One of the major metrics to calculate the network efficiency is the packet delivery ratio. is 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. e 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.

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. is 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
e labelled dataset used to support the findings of this study is available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.