A Sector-Based Energy-Efficient Lightweight Clustering Algorithm

Wireless sensor networks consist of a large number of nodes with constrained energy supply. Energy efficiency is hot and challenging issue in wireless sensor networks. Existing studies have shown that clustering is one of the efficient techniques to improve energy efficiency. An easy-to-implement and flexible method for even clustering and cluster head selection is beneficial to optimize network stability and energy efficiency. In this study, a sector-based lightweight and flexible clustering algorithm is developed to reduce node energy dissipation and optimize energy efficiency. Our proposal divides the area into virtual sectors. In the meanwhile, an even sector cluster is created using the sector decomposition approach. Based on the total communication distance, residual energy, and local node density, each node in the cluster calculates its own priority. The node with the highest priority is selected as the cluster head. Our proposal is compared with TSC,MH-TSC,SEECP,DREEP and LEACH. Experimental results show that the proposed algorithm outperforms these algorithms in terms of network stability and network lifetime.


I. INTRODUCTION
Wireless sensor network is the basic data acquisition system of internet of things [1], [2]. It consists of numerous low-cost wireless sensor nodes connected via 2.4GHz antenna. Nodes often have a limited power supply. Because wireless sensor networks are usually deployed in unattended areas, it is difficult to recharge or replace the batteries of nodes. Energy efficiency has been a major concern in wireless sensor networks.
Clustering algorithm [3], [4], [5] is one of the effective ways to increase the energy efficiency of wireless sensor networks. These algorithms first choose cluster heads in a random or deterministic way. The other nodes and cluster heads then naturally group together to form imbalanced clusters. The sensed data is aggregated to the cluster head during the data aggregation stage. The cluster head fuses the sensed data before sending it directly or via multiple-hops to the base station (called to as BS).
The associate editor coordinating the review of this manuscript and approving it for publication was Renato Ferrero .
LEACH and its enhanced proposal [3], [6], [7], [8] are the well-know clustering algorithm. These algorithms select cluster heads with probability, resulting uneven clustering. As a result, some cluster heads' energy dissipates too quickly, shortening the network lifetime. In order to defeat the energy hot-spot problem, uneven clustering is proposed [9], [10], [11], [12]. In uneven clustering, each cluster head's competition radius is determined by the distance from BS, residual energy, density and other parameters. All nodes within the competitive area become members of the cluster. Uneven clusters mean that cluster heads near BS form smaller clusters, whereas cluster heads far from BS form larger clusters. However, due to the random placement of nodes, it is difficult to ensure that the energy consumption is balanced.
The grid clustering algorithm [13], [14], [15] divides the area into virtual grids that are equal in size. Each virtual grid is organized in the cluster. The cluster head is responsible for collecting the sensed data and then delivering it to the BS directly or through multi-hop path. The experimental results presented in [13] and [14] demonstrate that the grid clustering is energy efficient. However, its main disadvantages are: (1) the algorithm cannot divide the area into specified number of virtual grids to meet the specific needs of the application; (2) the number of nodes in the grid is not equal, resulting in unequal clusters, thereby causing uneven energy dissipation.
The sector clustering algorithm divides the network into blocks according to sectors and concentric circles. Each block forms a cluster and selects one or more cluster heads based on the residual energy or the node position. The cluster heads of each block form a chain, which shortens the communication distance [16], [17]. However, the existing sector algorithms usually set a fixed number of sectors, and the impact of the number of sectors on the performance of the algorithm is not discussed; secondly, the multi-hop forwarding between cluster heads leads to a longer delay; Only residual energy is considered, and other parameters such as communication distance and node density are not considered.
Inspired by the previous discussion, we design a new lightweight energy efficient clustering algorithm. The algorithm divides the area into virtual sectors. Each sector is self-organized into a cluster. In a cluster, the proposal selects the cluster head according to the total communication distance, residual energy, and local node density. In addition, in order to avoid the problem that the energy dissipation of cluster heads is too quickly due to the excessive number of nodes in a sector, a sector decomposition strategy is used. The contributions of this work are as follows.
• A lightweight and flexible energy-efficient sector clustering algorithm is proposed. Our proposal divides the network into virtual sectors and the number of sectors is determined by the application requirement. In order to balance the energy dissipation of the cluster head, an even sector cluster is created using the sector decomposition approach.
• A cluster head selection mechanism for sector-clustering is developed. Based on the total communication distance, residual energy, and local node density, each node in the cluster calculates its own priority. The node having the highest priority is chose as the cluster head.
• We discuss the effect of the number of sectors, node density, and sink location on energy efficiency.
• The simulation results show that our proposal enhances the network stability and maximum network lifetime. In addition, the smaller sector produces better energy balance consumption and avoids excessive energy depletion of nodes, thus helping to extend network life. The rest of the paper is organized as follows. Section II describes relevant work. Section III gives the network model and the assumptions of this paper. Section IV describes the proposed lightweight clustering algorithm. Section V discusses the experimental results. Section VI is the summary and future work.

II. RELATED WORK
Clustering has been extensively studied and many clustering algorithms have been reported. Among these studies, LEACH [6] is one of the earliest and famous clustering algorithms for homogeneous wireless sensor networks. It adopts a probabilistic strategy to select cluster heads randomly. To balance energy consumption, the algorithm periodically rotates the cluster heads. However, since the selection of cluster heads is entirely random, it is easy to produce uneven clustering, which leads to unbalanced energy consumption. In addition, some parameters such as residual energy and distance from BS, which affect energy dissipation, are not considered.
Several algorithms have been proposed to enhance the performance of LEACH [7], [8], [18]. In LEACH-DT [7], the author selects the cluster head according to the distance between the node and the BS, thus balancing the node energy consumption. Experimental results show that the algorithm outperforms leach by 10% in terms of network lifetime. O-LEACH [8] uses the remaining energy to select cluster heads. The O-LEACH protocol has better energy efficiency than LEACH. Similarly, DEC [19] is a deterministic energy-efficient clustering algorithm that uses residual energy to select cluster heads, which outperforms probability-based algorithms [20], [21]. When DREEP [22] selects the cluster head, it uses the energy, the distance between the node and the BS, and the number of rounds that the node waits continuously before becoming the cluster head to calculate the possibility of being selected as the cluster head. When the possibility is greater than the threshold, it is finally selected as the cluster head. LEACH-C [18] is a centralized algorithm. Its feature is that the cluster heads are selected by the BS to ensure that each cluster head is the best choice. SEECP [23] is another clustering algorithm used to improve network stability. It adopts the same cluster head selection mechanism as DEC. To reduce the energy consumption of long-distance cluster heads, SEECP designs an inter-cluster routing strategy that mixes single-hop and multihop transmission. The threshold R is used by the cluster head to select an appropriate routing strategy. In seecp, R is calcu- , where X max , Y max represent the length and width of the monitoring area, respectively. The experimental results show that SEECP has a longer network stability period than DREEP.
NEAP [24] is an energy adaptive protocol. It uses the threshold of each round to select cluster heads. The threshold is a function of the number of consecutive rounds in which a node does not act as a cluster head and the remaining energy of the node. Compared with LEACH, NEAP has better performance in cluster head selection. TEEN [25] is an energy-efficient reactive protocol for event-driven applications. The authors designed two types of thresholds: hard thresholds and soft thresholds to reduce the frequency of data transmission. When the threshold is set appropriately, the energy efficiency will be significantly improved. However, if a node's sensed data change cannot exceed the threshold, then it will never be able to communicate with the cluster head and the BS cannot receive any data from that node.
Hot-spot or energy hole is a key factors affecting energy efficiency. It refers to the premature death of cluster heads closer to the BS due to uneven energy dissipation. Using the competition radius of nodes to form unequal clustering is a popular strategy to solve the hotspot problem. UDCH [10] uses energy, distance to BS, and maximum competition radius to calculate the competition radius of cluster heads, and then forms unequal clusters, which balances the energy consumption of cluster heads. Recently, some studies have integrated the intelligent decision-making of fuzzy logic with clustering [26], and effectively deal with the uncertainty of clustering algorithm in cluster head selection, cluster formation, and inter-cluster routing [10], [11], [27], [28], [29], [30], [31]. E-FUCA [27] is an enhancement of FUCA [32]. It designs a fuzzy logic system (FIS) with three input variables: residual energy, average communication distance, and distance to BS. At the beginning of each round, each node generates a random number. When the random number is greater than the threshold, the node becomes the candidate cluster head. Subsequently, each candidate cluster head uses FIS to calculate its rank and competition radius, and then, according to the output of FIS, the official cluster head is determined. The inter-cluster routing of E-FUCA also uses FIS to make intelligent decisions. The experimental results show that E-FUCA prolongs the network stability period. The FIS system used by EFUC [11] to calculate the competition radius has three input variables: residual energy, distance to BS and node density. First, a node generates a random probability that indicates its likelihood of being elected as a cluster head. Then combined with the competition radius, the final cluster head is selected. In EEFUC, the cluster head also uses FIS for routing decisions. F5NUCP [28] designs FIS with remaining energy, distance to BS, distance to neighbor nodes, node degree, and link quality as inputs. The cluster head and its competition radius will be selected and calculated based on the FIS. Applying smart computing to cluster is an approach worth paying attention to [33], [34], [35], [36], and [37]. ECRP-UCA [33] is a protocol that applies intelligent computing methods to clustering. It also exhibits good performance. EETC [34] uses ACO to calculate the optimal route between clusters. In [36], the author proposes a clustering strategy with k-means as the core, while applying a metaheuristic hybrid algorithm to optimize energy consumption.
The sector clustering algorithm is a clustering algorithm that divides the network area by sectors and concentric circles [16], [17], [38], [39], [40]. TSC [16] is the earliest proposed sector clustering algorithm. In each sector, a chain is formed between the cluster heads to reduce the distance between the cluster head and the BS, but increase the delay. In TSC, cluster head selection is based on node positions without considering residual energy. MH-TSC [38] improves TSC by selecting multiple cluster heads per cluster. To balance energy consumption and workload, MH-TSC selects multiple cluster heads for each cluster based on the remaining energy. The experimental results show that the multi-head strategy is beneficial to improve energy efficiency. For dense wireless sensor networks, Naveen proposed TSTCS [39]. TSTCS uses a tree-structured clustering. In each clustering, TSTCS selects R cluster heads based on the remaining energy. In each round, the cluster head with the most remaining energy becomes the active cluster head.
In the aforementioned algorithms, for the algorithms that use the competition radius for clustering, their disadvantage is that the clustering based on the competition radius may not completely cover the entire area, resulting in isolated nodes. For probability-based clustering algorithms, they are prone to form unequal clustering structures, which affect energy efficiency. Existing sector clustering algorithms decompose network regions into blocks. The chains formed between the cluster heads shorten the communication distance of the cluster heads and improve the energy consumption. However, cluster head selection only considers the residual energy. Therefore, this paper proposes a new sector clustering algorithm. Each sector forms a cluster. When electing cluster heads, we mainly consider the total communication distance, residual energy, and node density.

III. NETWORK MODEL AND ASSUMPTIONS
Our work considers a static homogeneous wireless sensor network. The nodes have the same initial energy and are randomly dispersed in the target region. To simplify the discussion, we make the following assumptions.
• BS has a continuous energy supply and high processing and storage capacity.
• The battery of the node is not replaceable or rechargeable.
• Nodes can obtain their own location information by using GPS or other methods. In the proposed algorithm, the energy model mainly considers the energy consumption of transmission, reception, data acquisition, and data aggregation. When the distance is d, the energy consumption of transmitting or receiving s bits is given by the following equation (1) and (2).
where E ele is the dissipative energy in electronic circuitry, amp denotes the energy dissipated in amplification of the wireless signal, and d 0 is a threshold which can be calculated by the equation (3).

IV. OUR DESIGN
In our algorithm, the total communication distance D a , residual energy E r , and node density ND are used for cluster head selection. Table 1 shows the symbols used in our algorithm and their meanings.
According to the used energy model, the communication distance is closely related to the energy dissipation. Obviously, the shorter communication distance can save the energy of the cluster head. The total communication distance is critical in choosing a cluster head. It can be calculated using equation (4).
where D i a is the total communication distance when node i is cluster head, n ins is the number of nodes in a cluster. D i,BS is the distance to BS. D i,j denotes the distance between node i and j, and it can be calculated by the equation (5).
where i.xc, j.xc, i.yc, j.yc are x and y coordinates of the node i and node j respectively. To avoid nodes with low energy being selected as cluster heads, the residual energy also needs to be considered. It can be calculated by the equation (6).
where E ini is the initial energy level, and E dis is the energy dissipated till now. Node density is the number of neighbors. The more neighbors a node has, the more it helps to reduce the total communication distance, thereby slowing down energy consumption. For any node i in the sector, the node density can be calculated by the equation (7).
When selecting cluster heads, D a , E r , and ND are given different weights, which indicates their importance. We calculate the priority of the node according to equation (8). Then, arrange all the nodes in descending order of priority, and select the node with the highest priority as the cluster head. Other nodes in the cluster will be connected to the cluster head to form a one-hop cluster.
The monitoring area is divided in to n * p sectors S 1 , S 2 , . . . , S n * p . Fig. 1 gives an example of network division when the n = 100 and p = 0.1. The number of sectors is 10. The BS locates at (50,50). The flowchart of our algorithm presents in Fig. 2. The detailed algorithm performed at each node is presented in algorithm 1.
Theorem 1: For algorithm 1, the lifetime of network L satisfies min( ), where n ins is the number of nodes in cluster, and n ins ≤ 1/p. s is the number of bits of transmitting or receiving.
Proof: According to algorithm 1, for any cluster, the total energy consumption of the cluster is . Below, we discuss the two cases separately. Case 1: the communication distance within the cluster is less than do and the communication distance between the cluster head and the BS is also less than do. According to the energy model 1, the energy consumption of cluster can be calculated by equation (9).
Therefore, when the nodes are uniformly distributed in the monitoring area, the network lifetime L ≤ max( n ins E0 E C ). Case 2: the intra-cluster communication distance is greater than do, and the distance between the cluster head and the BS is also greater than do. Obviously, we have equation 10.

A. COMPLEXITY
A total of n nodes are deployed in the network. For cluster head election, each node independently calculates its priority. In the worst case, a node needs to make n ins − 1 comparisons to be selected as the cluster head, as shown in Algorithm 1. Therefore, for n nodes, a total of n * (n ins − 1) comparisons are required to complete the cluster head election. In SEECP and DREEP, the selection of each cluster head involves all nodes in the network. In the worst case, the selection of a cluster head needs to be compared n − 1 times. Therefore, n * (n − 1) comparisons are required, and the message complexity is O(n 2 ).

V. SIMULATION RESULTS
In this section, we evaluate the proposed algorithm through simulation experiments and compare it with TSC, MH-TSC, DREEP, SEECP, and LEACH. TSC is a track-sector clustering that divides the network area into tracks and sectors. TSC defines the blocks formed by the intersection of tracks and sectors as clusters. The node which has the highest residual energy is selected as the cluster head. A chain from cluster head to BS is constructed to reduce transmission distance. MH-TSC is also a track-sector clustering algorithm. It uses single-hop communication in clusters. To share the energy cost, MH-TSC selects two cluster heads in each cluster. The simulation experiment is mainly carried out from two aspects of network scale and sink location, and three scenarios are designed. The final result for each scenario is based on 20 randomized experimental networks. The performance metrics chosen in our experiments are First Node Dead(FND), Half Node Dead(HND), Last Node Dead(LND), Total Average Residual Energy, and Total Alive Nodes. Finally, the effects of the number of sectors and node density are discussed separately. The parameters are given in Table 2.
The round when the first node dies indicates the network stability period. Fig. 3 shows the results of lifetime comparison in each random network. In Fig. 3a, we can see that the average gain in network stability period is 27%, 18.1%, 94.6%, 12.6%, and 35.7% as compared to TSC, MH-TSC, DREEP, SEECP, and LEACH. For average HND VOLUME 10, 2022

Algorithm 1 Sector-Based Energy-Efficient Lightweight
Clustering Algorithm 1: Input: The coordinates of sink: (x,y); The number of nodes: n; 2: Output: Cluster head list and clustering; 3: for node i = 1 to n do 4: Get its i.xc and i.yc coordinates; 5: end for 6: The number of sectors n s = n * p; 7: The angle of sector α = (2π)/(n * p); 8: for node i to n do 9: Calculate the angle (named β) between node i and sink using arctan(i.yc -s.yc, i.xc -s.xc); 10: i.sector = β α ; 11: end for 12: for sector j = 1 to n s do 13: Count the number of nodes (named n ins ) in sector j; 14: if n ins ≥ λ p then 15: Calculate the number of sub-sectors using n ins λ * 1/p 16: for each node in sector j do 17: Calculate the sub-sector number of node (named ss) in sector j, and update the node's sector number to ss; 18: end for 19: Update n s using n s + = n ins λ * 1/p − 1; 20: end if 21: end for 22: for sector j = 1 to n s do 23: for each node in sector j do 24: Calculate the priority of node by using equation 8. 25: end for 26: Select the node with the highest priority as the cluster head. 27: end for 28: The cluster head broadcasts its message, and each sector forms a one-hop cluster.
shown in Fig.3b, the proposed algorithm is 11.5%, 7.3%, 29.6%, 11.3%, and 3.1% better than TSC, MH-TSC, DREEP, SEECP, and LEACH respectively. Fig. 3c shows the maximum lifetime of the network. The proposed algorithm has  Table 3  TABLE 3. Lifetime comparison when n=100.  presents the average of 20 random networks. It also gives insight into the performance of these algorithms in terms of network lifetime. The sector clustering outperforms other algorithms as it takes full advantage of the sector and the cluster head selection. Due to the sector division, each cluster in the network is relatively balanced, which alleviates the problem of unbalanced energy dissipation of the cluster head, thus increasing the network stability period. The maximum network lifetime is also significantly longer than the compared algorithm. Fig. 4 and 5 show the average experimental results of TSC, MH-TSC, DREEP, SEECP and the proposed algorithm in terms of the alive nodes and total remaining energy per round, respectively. As can be seen from the figures, the changes in the number of alive nodes and the remaining energy confirm the conclusion reached in Fig.3.
To evaluate the effect of the network scale on the algorithm performance, 200 nodes are randomly distributed in  the 100m × 100m area. Fig.6 shows the results of the proposed algorithm, TSC, MH-TSC, DREEP and SEECP for 20 random networks in terms of FND, HND, and LND. The results show that when the number of nodes is increased, all algorithms change no more than 5% in terms of FND, HND, and LND, which shows that the network scale has a limited effect on the performance of the algorithm. In Fig.6a, the VOLUME 10, 2022  improvement on FND is about 11.9%, 132.3%, 13.5%, and 34.9% as compared to TSC, DREEP, SEECP, and LEACH. It can be seen from the figure that the network stability of MH-TSC is comparable to the proposed algorithm due to the sharing of energy consumption by multiple cluster heads. Fig.6b shows the HND produced by our proposal is 12.4%, 24.3%, and 11.2% higher than TSC, DREEP and SEECP. MH-TSC and LEACH are not far behind the proposed algorithm in terms of HND. In Fig.6c, the proposal extends LND by 49.8%, 51.3%, 77.7%, 69.6%, and 34.8% as compared with TSC, MH-TSC, DREEP, SEECP and LEACH, respectively. Table 4 presents the average of 20 random experiments. Fig. 7 and 8 present the average alive nodes and total remaining energy for each round, respectively. The results confirm that the proposed algorithm has better energy efficiency and network lifetime, especially in keeping the network stable period. According to Fig 3-8, we can conclude that the size of the network has little effect on the performance of the algorithm. Compared to TSC, MH-TSC, DREEP, SEECP, and LEACH, the proposed algorithm has advantages in terms of network stability (that is FND) and maximum network lifetime (that is LND).
Next, we place the sink at (50, 0) to assess the effect of the sink's position. Fig. 9 displays the algorithm results in terms of FND, HND and LND. According to Fig.9a and     multi-hop communication, which can better deal with the problem of energy consumption caused by increased communication distance. Table 5 gives the average lifetime in terms of FND, HND, and LND. Finally, it can be concluded from Fig.9c that the proposed algorithm outperforms the compared algorithms on LND. The results in table 5 show that the proposed algorithm increases the maximum network lifetime by 40.6%, 27.8%, 101.4%, 64.9%, and 35.4% compared to TSC, MH-TSC, SEECP, DREEP, and LEACH, respectively. A possible reason is that smaller sectors reduce the energy consumption of cluster heads, partially offsetting the energy consumption caused by the increase in communication distance. Fig.10 and Fig. 11 show the average alive nodes and total residual energy for each round. The results demonstrate that the proposed algorithm has clear benefits over DREEP. In each round, the proposed algorithm significantly exceeds the DREEP in terms of the number of alive nodes and remaining energy. But in comparison to TSC, MH-TSC, SEECP and LEACH, the advantage is a little reduced.
From Fig. 9-11, one can conclude that the position of BS affects the performance of the proposed algorithm. With regard to maximum network lifetime, the proposed algorithm is better than TSC, MH-TSC, DREEP, SEECP and LEACH.
Finally, the effect of p and node density on algorithm performance is evaluated. In this experiment, 100 nodes    are randomly distributed in 100mx100m area. Fig. 12 indicates the FND of the algorithm when p is different. Among the 20 random networks, the variation of FND is not evident. In Table 6, as p increases, the algorithm does not change much in terms of FND and HND. In particular, there is a clear increase in LND when p increases from 0.10 to 0.20. As the number of sectors increases as p increases, smaller sectors are found to improve energy efficiency. Fig. 13 shows the FND when n is changed from 100 to 300. The conclusion is that the density of the nodes has a little effect on energy efficiency. When the number of nodes increases from 100 to 300, the maximum network life increases by about 16.7%. Table 7 supports this conclusion based on three aspects of FND, HND, and LND.

VI. CONCLUSION
This work studies the energy efficiency of wireless sensor networks and proposes a new lightweight sector-clustering algorithm. The proposal divides the network into virtual sectors, and limits the number of nodes in each sector by using sector decomposition, thus balancing the energy consumption. In our algorithm, a sector is a cluster. The total communication distance, residual energy, and node density are used to select cluster head. The simulation results indicate that the proposed algorithm improves the network stability and extends the network's lifespan. As a lightweight clustering algorithm, the algorithm is appropriate for IoT applications.
Our future work is to apply the algorithm in a real-world environment or introduce multi-hop routing for the algorithm. In addition to that, the application of fuzzy logic or intelligent computing to our algorithm is also a very interesting direction to look at.