Energy-Efficient Unequal Chain Length Clustering for Wireless Sensor Networks in Smart Cities

The recent advances in sensing and communication technologies such as wireless sensor networks (WSN) have enabled low-priced distributed monitoring systems that are the foundation of smart cities. These advances are also helping to monitor smart cities and making our living environments workable. However, sensor nodes are constrained in energy supply if they have no constant power supply. Moreover, communication links can be easily failed because of unequal node energy depletion. The energy constraints and link failures affect the performance and quality of the sensor network. Therefore, designing a routing protocol that minimizes energy consumption and maximizes the network lifetime should be considered in the design of the routing protocol for WSN. In this paper, we propose an Energy-Efficient Unequal Chain Length Clustering (EEUCLC) protocol which has a suboptimalmultihop routing algorithm to reduce the burden on the cluster head and a probability-based cluster head selection algorithm to prolong the network lifetime. Simulation results show that the EEUCLC mechanism enhanced the energy balance and prolonged the network lifetime compared to other related protocols.


Introduction
As cities come to be more and more crowded, public safety, efficient transport, preserving energy, lessening expenses, and improving the quality of life are becoming indispensable.Therefore, the smart city term is gaining popularity among scientific researchers.Chen [1] defined smart cities as "taking the advantage of communications and sensor capabilities sewn into the cities infrastructures to optimize electrical, transportation, and other logistical operations supporting daily life, thereby improving the quality of life for everyone." With recent advances in microelectromechanical systems technology and the low price of manufacturing very small low powered sensing devices and deploying them on a large scale, smart cities are becoming technically and economically possible.Wireless sensor networks (WSNs) are equipped with computing, sensing, and wireless communication capabilities.Moreover, due to their small size and low cost, sensors are normally deployed in different environments, where they can collaborate among themselves to form a special sensor network.Since WSN may consist of tens, hundreds, or thousands of sensors, it helps to achieve fault tolerant, reliable, and accurate sensor network covering a wider region [2].
Given these capabilities, WSN have recently stood out as a platform on which to deploy different kinds of important smart city applications [3,4], such as power systems [5,6], transportation and roadside applications [7,8], healthcare [9,10], and air pollution monitoring [11].Figure 1 presents the various kinds of application using WSN deployment in smart cities.
However, wireless sensor nodes have limitations in their capabilities, such as small memory, limited energy, and low processing power [12,13].Sensors consume energy in sensing, data processing, and communicating without a permanent power supply along with the difficulty of replacing them.Communication is often the most energy-intensive.As a result, it is generally accepted that a WSN expires when its battery runs out, which affects its performance, quality, and lifetime.
Therefore, the lifetime of a network in critical applications such as power systems is decisive because the ability to save human lives as long as possible is very urgent.Due to the strict energy constraints, prolonging the lifetime of the sensor networks and reducing energy consumption are the most critical problem that must be considered when designing a WSN for a smart city.
If each and every sensor starts to communicate their data directly to the base station, the energy of the sensor nodes will be consumed quickly due to the long distances to the base station.In addition, congestion and collisions will consume more energy due to data retransmission.Clustering mechanism for the WSN is the approach used for solving these concerns.In clustering mechanism, nodes within a cluster send their data over shorter distances to their respective cluster heads, which aggregate sensed data from the surrounding general nodes into small sets of meaningful information and pass it on to the base station.Furthermore, aggregating and fusing data at the cluster head within a cluster helps to enucleate data redundancy.
Being a cluster head node means that it consumes more energy than general nodes, but this burden can be alleviated by selecting a few sensor nodes as a cluster head and rotating this role among the cluster members.The cluster heads can send data directly or use multihop to send data to the base station.Many protocols have been proposed to improve their energy consumption and the network lifetime, such as the Low-Energy Adaptive Clustering Hierarchy (LEACH) [14], Power-Efficient Gathering in Sensor Information Systems (PEGASIS) [15], Hybrid Energy-Efficient Distributed Clustering (HEED) [16], Energy-Efficient Unequal Clustering (EEUC) [17], and the Fast Local Clustering Service (FLOC) [18].However, the unsolved issue of energy consumption and hotspot [19] in the previous clustering protocols for WSN still exists.
In order to overcome several hotspot issues, we present and evaluate the EEUCLC, Energy-Efficient Unequal Chain Length Clustering protocol for the systemic gathering of data from the sensing environments where each node for every round has an information packet that should be transmitted to the base station.EEUCLC is a distributed competitive protocol where cluster heads are selected by localized competition.EEUCLC groups the networks into several unequal intracluster chain lengths and finds suboptimal multihop routes over the cluster heads to propagate the aggregation data to the base station.In EEUCLS protocol, the node with the highest residual energy and shortest distance to base station has the best chance to become the cluster head.Therefore the nodes transmission radius decreases as its distance to base station decreases, which leads to creating smaller cluster sizes with shorter sensors chain length than those farther away from the base station.Hence, the accelerated consumed energy due to intracluster data processing and long distances to respective cluster heads will be reduced.EEUCLC also considers distance and residual energy to find suboptimal paths between cluster head nodes to the base station and uses these paths randomly for every data transmission occasion.
LEACH presented in [14] is a well-known clustering protocol for wireless sensor networks.LEACH is a distributed cluster formation without centralized control where each cluster head gathers data from all of the nodes to reduce global communication.LEACH rotates the cluster head role among all the nodes to distribute the energy load evenly.Also, an improved scheme of LEACH was proposed, named LEACH-C [25].In LEACH-C, a centralized algorithm at the base station makes cluster formation.
In [15], Lindsey and Raghavendra proposed PEGASIS.PEGASIS is an enhancement of the LEACH protocol and makes a communication chain using a TSP (Traveling Sales Person) heuristic.Each node only communicates with two close neighbors along the communication chain.Only one node is chosen to send the data to the base station instead of multiple nodes.All nodes in the chain will take turns sending to the base station.
HEED presented in [16] is a multihop clustering protocol.It extends LEACH by considering range limits of the wireless communication and intracluster communication cost.It is considered as a distributed cluster formation where each node makes a decision based on local information.The probability for each node to become a tentative cluster head depends on its residual energy, and all the tentative heads are competing for becoming the final cluster heads.The final cluster heads are selected according to the intracluster communication cost.
In [17], Li et al. proposed EEUC, which is an Energy-Efficient Unequal Clustering protocol.It divides the nodes into clusters of unequal size.The clusters closer to the base station have smaller sizes than those farther away from the base station.Thus cluster heads closer to the base station can preserve energy for the intercluster data forwarding.
FLOC [18] is a distributed clustering technique that uses the solid-disc property to minimize overlap between multiple clusters.A node communicates reliably with others within its unite distance defined as the inner-band (I-band) range and communicates unreliably (only a percentage of messages go through) with nodes within  ≤ 2 distance defined as the outer band (O-band) range.FLOC is fast and scalable and achieves clustering in O(1) time.
In [20], Ever et al. proposed UHEED which is an unequal clustering algorithm that tries to reduce energy consumption and avoid the early death of cluster heads closer to the base station by adjusting the completion radius of the HEED protocol based on the equation being used in EEUC.
In [21], Ren et al. proposed the Unequal Clustering Scheme based on LEACH for better energy balancing and extending network lifetime.The energy ratio and competition distance are used as two elements to join the cluster head selection.In this scheme, nodes can adjust their transmission power based on receiving a distance matrix from the base station.
EADUC [22], Energy-Aware Distributed Unequal Clustering, protocol is a distributed unequal clustering technique that supports both homogeneous and heterogeneous networks.The clustering formation is divided into three subphases: neighbor node information collection phase, cluster head competition phase, and cluster formation phase.Cluster heads with higher residual energy and being further away from the base station will have a larger cluster size.
UCA [23], location-based unequal clustering algorithm, is another unequal clustering algorithm where each cluster head has a different cluster size based on its distance to the base station.LUCA forms a cluster which has a smaller cluster size as the distance to the base station decreases.
In [24], Yang and Zhang proposed EB-UCP, Energy-Balancing Unequal Clustering Protocol, where the closer nodes to the base station have a higher probability of being selected as cluster heads.In EB-UCP, the network is split into layers, and the nodes in each layer have their own probability of cluster head selection.

Accelerated Energy Consumption Problem.
In a largescale network, the relationship between network size and cluster size is proportional where the number of nodes in the cluster increases as the network size increases.It means that cluster heads bear a heavy burden and consume a considerable amount of energy.Using the single hop forwarding model within the cluster, where each node sends its data directly to their respective cluster head, leads to an increase in the number of transmitted messages to the cluster head from nodes within the cluster.
Congestion and collisions can also take place, which in turn will consume more energy due to data retransmission.Other problems arise if the cluster head is far away from the nodes.In this case, some nodes will require a large amount of transmission power to convey their data; thus the energy of the nodes will be drained quickly.
Using multihop communication models between several cluster heads to forward the aggregated data to the base station is considered as a good solution for cluster heads that may not be able to communicate directly with the base station.However, using this method might be considered as another factor causing high energy consumption by the cluster head.
It happens in two different ways.First, if a cluster head is nearest to the base station it will act as a router for other nodes and is burdened with heavy relay traffic.Second, the best single route between a cluster head node to the base station will be found based on cluster head residual energy and the energy of the transmitter.This route is used for every communication.This will drain the energy of the cluster heads along this path.Therefore, the fundamental goal is to overcome these hot spot problems.
The protocol considers the periodic selection of cluster heads based on the nodes residual energy and distance to the base station.Furthermore, we present unequal chain clustering and a suboptimal multihop routing protocol to alleviate the burden on the cluster heads and prolong the lifetime of a sensor network.

Network and Radio Models.
We consider a WSN of hundreds or thousands of  energy-constrained sensor nodes, which are uniformly deployed over a sensing environment.We denote node  by   and the identical sensor node set  = { 1 ,  2 , . . .,   }, where 1 ≤  ≤ || and || = .In this work, our model sensor network is based on the following assumptions: (i) The base station is fixed and situated at far distance from the sensor nodes.
(ii) Links between the nodes are symmetric.
(iii) Nodes in the network are homogeneous.
(v) The network is location aware, that is, equipped with a GPS capable antenna.
(vi) The nodes are able to utilize power control when transmitting data.
(vii) The nodes are not mobile.
We adapt the same radio model described in Heinzelman et al. [26].In this radio model, a radio dissipated energy to run the transmitter and transmitter amplifier.In addition, the radio dissipated energy to run the receiver circuitry.Both the free space model ( 2 power loss) and the multipath fading ( 4 power loss) channel models are used, where the dissipation energy to run the transmitter amplifier depends on the distance between the transmitter and receiver.In this radio model, the energy dissipated to transmit 1-bit message for a distance  is computed as follows.
Cluster heads gather sensing data within cluster and transmit data to the nearest cluster and then to base station Transmitting

Cluster head selection Chain construction
Receiving

Proposed Algorithm
Figure 2 shows the flow chart and Figure 3 shows a general overview of the EEUCLC protocol, respectively.The EEUCLC protocol consists of three phases: (1) cluster head selection, (2) chain formation, and (3) data collection and transmission.In Figure 3, the circles of unequal size represent clusters of unequal chain length and the routes among the cluster heads clarify the multihop forwarding model.

Cluster Head Selection Phase.
When clusters are being created, several candidate cluster heads are selected to compete to become final cluster heads in the current round.Periodic reselection within the cluster is performed to balance the energy consumption of each cluster.
For candidate cluster head selection, EEUCLC makes a tradeoff between the nodes residual energy and distance to the base station.A node having low residual energy with a long distance to the base station will not be selected to compete for the final cluster head.Before a node starts carrying out EEUCLC, it sets its probability to become a candidate cluster head, CCH prob , as follows: where  residual denotes the estimated current residual energy;  max is the maximum energy, which is congruous for all nodes;  max and  min denote the maximum and minimum distance between sensor nodes and the base station, respectively.(  , BS) is the distance between   node and the base station, and  is a constant coefficient.For a node to become a candidate cluster head, the value of CCH prob should be larger or equal to a certain threshold .Nodes below this certain threshold value keep sleeping until the cluster head selection phase terminates.The purpose of using CCH prob is to limit the initial cluster head announcement and prevent nodes far away from the base station with low residual energy from consuming more energy due to an additional packet transmission overhead while competing to become the final cluster head.
After the candidate cluster heads have been selected, competition starts for the final cluster head phase.A candidate cluster head only becomes a final cluster head if it has greater residual energy than the other nodes in its competition radius.In order to create unequal intracluster chain lengths, we need to control the cluster size.In EEUCLC, intracluster chains closer to the base station have a shorter length than those farther away.
To achieve our objective, the cluster head competition radius should decrease as its distance to the base station decreases.To compute the cluster head competition radius, we use the same equation being used in EEUC: where  is a constant between 0 and 1, and  0 comp is the initial cluster range used in remote areas from the base station.
Figure 4 shows an uneven competition radius of candidate cluster heads where candidate cluster heads  3 and  4 cannot both be final cluster heads because they are in the competition radius of each other, while the opposite occurs for  1 and  2 .
Competition for final cluster head selection messages is broadcast with  0 comp .In lines 5-29 of Algorithm 1, competition for final cluster heads starts when each candidate cluster head broadcasts a CompeteChainHead MSG containing residual energy and competition radius and sets a random wait time.
If no CompeteChainHead MSG is received within a random wait time, the candidate head node broadcasts ChainHead ADV MSG containing HeadNode id.In the case where the candidate head node receives CompeteChain-Head MSG from another candidates node, if (  ,   ) <   .comp or (  ,   ) <   .comp , then they become part of one cluster group.
Each candidate cluster head in the cluster group checks the residual energy of the others.The candidate head node that has the highest residual energy sends FinalChainHead MSG to inform its neighboring candidate cluster heads.If two candidate head nodes have the same residual energy, then the candidate node with the smaller  sends FinalChainHead MSG.
If candidate head node   is located in the competition range of candidate head node   and receives FinalChain-Head MSG from   ,   will give up and send Resignation MSG which contains the s to all candidate head nodes in its competition range, as shown in Figure 5.
If candidate head node   receives Resignation MSG from candidate head node   and   belongs to competition range of   ,   will remove   from its cluster group, as shown in Figure 6.
After the cluster head chain has been selected, sleeping nodes wake up and each final cluster head broadcasts a ChainHead ADV MSG containing HeadNode id.Eventually, each normal node selects the cluster to which it will belong for this round (this decision is based on the received signal strength).The larger the received signal strength is the closer the cluster head will be selected, thus, with minimum transmission power required for normal nodes to communicate with cluster head.This is carried out by normal nodes sending ChainMember MSG which contains .

Chain Construction Phase.
In each cluster group, chain construction starts with the cluster head node creating a c s i s j  routing table and sending it to the closest node, which then joins the chain first.The routing table contains a list of all of the nodes belonging to the cluster and the target node  FS (the node at the farthest distance from the cluster head).The list of nodes is ranked based on how near they are to the respective cluster head.During chain construction, each intermediate node forwards the request only to the neighbors that are farther away from the cluster head node than itself and have the minimum distance between each other; thus, at node   , the request is only sent to neighbor   , which satisfies (  , CH  ) ≤ min((  , CH  )), where (  , CH  ) denotes the distance between node   and its respective cluster head node (CH  ), and   and   are the intermediate nodes between  FS and CH  , respectively.
In lines 1-15 of Algorithm 2, when a node receives a request packet, it checks whether it is the target node or not.If it is not the target (the farthest node from respective cluster head), it sends the request to a node that has not yet joined the chain and has the smallest distance to the cluster head.
During the chain construction process, if two nodes in the same cluster group cannot reach each other, a node can change its transmission power.The chain construction process terminates when the target node has been discovered.
Figure 7 shows the chain construction steps and data transmission between the nodes along the chain.After the chain construction process terminates and suboptimal multihop routes over the cluster heads have been discovered, the cluster head gathers sensing data within the cluster where each node receives data from a neighbor.The cluster head also fuses them with its own data, forwards them to another neighbor along the chain, and so on until the cluster head receives the fused data.
EEUCLC performs data fusion at each node except node  FS located at the end of chain.Figure 8 shows a flow chart of cluster formation.

Intercluster Multihop Routing.
In order to minimize the overhead, we have to ensure that the time duration of the data transmission phase is longer than the time taken by the clustering protocol to cluster the network.We utilize the advantage of the long data transmission phase to build an energy-aware intercluster multihop routing protocol by considering the residual energy of and distance to the neighboring cluster head nodes.
Since the transmission phase will be long enough to send as much data as possible to the base station, we want to ensure that there is more than one route between the cluster head nodes and the base station used for communication.Frequently using the same route between cluster head nodes leads to depleting their energy levels along the path.It leads to vast variation in the energy levels of the nodes and finally causes network partitioning.Hence, we have designed an energy-aware multihop routing protocol for the intercluster communication.
Using EEUCLC, we try to find suboptimal routes between cluster head nodes to the base station and use these routes randomly for each data transmission.In lines 1-13 of Algorithm 3, after cluster head nodes have been identified for the current round, each   broadcasts a message across the networks at a specific power level containing residual energy, distance to the base station, and HeadNode id.
We also present a threshold   into the proposed intercluster multihop routing protocol so that if the cluster head distance to the base station is smaller than or equal to  , it directly transmits its data to the base station.When the cluster head node   receives broadcasted packets, it checks the distance.If a node   has a smaller distance to the base station than node   , node   discards the received packet.Otherwise, the node   selects suboptimal cluster heads to forward its data from the cluster head node candidates.
The suboptimal cluster head nodes list is defined as   .SCH = {HE residual (min((  ,   )))}, where SCH is defined as a set of suboptimal neighboring cluster head nodes which have higher residual energy and require the minimum transmission power for communication, HE residual denotes the higher residual energy of group cluster head nodes, and min((  ,   )) denote the minimum distance between the group of head nodes.
After each cluster head has chosen relay nodes, the former randomly selects nodes for each data transmission occasion from the candidate cluster headset to relay data to the base station.Figure 9 shows the suboptimal routes construction steps and data transmission between cluster heads.

Protocol Analysis
This section shows the analysis of the protocol described in Algorithms 1 and 2. Since the cluster head selection process is by message passing, we first discuss its message complexity.

Lemma 1. The message complexity of the cluster formation algorithm is 𝑂(𝑁).
Proof.At the beginning of the cluster formation, × candidate cluster heads are selected and each one of them broadcasts ℎ .Then each of them makes decision to be cluster head or not by broadcasting -ℎ  or  .Suppose  cluster heads are selected, they send out  ℎ  , and then ( − ) ordinary nodes transmit ( − ) ℎ .After that  − 1 nodes send ℎ  .Thus the messages are up to 2 ×  +  +  −  +  − 1 = 2( + 1) − 1 for cluster formation stage per round.Lemma 1 shows the message overhead of EEUCLC is small.

Lemma 2. The time complexity for the cluster head selection algorithm is 𝑂(𝑁).
Proof.EEUCLC protocol takes a processing time of at most 2 ×  among candidate cluster heads which declared their willingness to be cluster heads.This happens if more than one candidate cluster head is in the range of competition radius of each other.For the opposite, its takes at most  ×  time.In both cases for sleeping nodes to join cluster it takes at most  −  processing time.Therefore, the total processing complexity is ().

Simulation Results
We evaluated the performance of the proposed EEUCLC protocol using Matlab Simulation tools [27] to perform several extensive computing experiments.We also compared our simulation results with LEACH, improved LEACH, and EEUC, in terms of energy consumption by the cluster heads, network lifetime, and the number of nodes alive.
For our experiments, we simulated an environment where sensor nodes were uniformly deployed in the sensing field and the base station was located outside the WSNs.All sensor nodes periodically sensed events and forwarded data packets to the base station.The energy model adopted in our simulation is the same as that used in Heinzelman et al. [26].The values of the simulation parameters are given in Table 1.
We set  to 0.5 in (3),  0 comp to 90 m,  to 0.5 in (4), and   to 130 m.For each simulation scenario, the results are reported as the average value of 20 runs.

Energy Efficiency.
In this section, we examine the energy efficiency of EEUCLC.Figure 10 presents the amount of energy spent by cluster heads derived from the EEUCLC, LEACH, improved LEACH, and EEUC schemes.The -axis indicates 20 sampled rounds of simulation while the -axis indicates the amount of energy spent by the cluster heads.
The results show that the energy consumed by cluster heads per round using EEUCLC was much smaller than other schemes.This is because cluster heads of LEACH and improved LEACH communicated their data directly to the base station, which consumed more energy, and because the cluster heads using LEACH were not uniformly distributed throughout the network due to the random selection of cluster heads.
Furthermore, in EEUC, the energy consumption of the cluster heads is higher than EEUCLC because EEUC tried to find the best single route between cluster head nodes and the base station and sent all aggregated data along this path, which drained the energy of the cluster heads along this path.In EEUCLC, the cluster heads transmitted their data to the base station via multihop and tried to find suboptimal routes between the cluster head nodes and the base station and transmitted data through the randomly selected suboptimal routes; thus a considerable amount of energy was saved.
We also investigated the energy efficiency of the proposed protocol by examining the network lifetime.Figure 11 shows (1) On receiving ℎ   from cluster head (2) ℎ () (3) if cluster head = True then (4) V  ←  (5) for each node   in cluster do (6) if   ̸ =  FS then (7) if (  , CH  ) ≤ min((  , CH  )) then (8) V .( ) (9) V  =   (10) end if (11) else (12) EXIT; (13) end if (14)     the time until the first node died, while Figure 12 shows the time until the last node died.EEUCLC clearly improved not only the time until the first node died, but also the time until the last node died compared to other schemes.With a sensing field of size 200 m × 200 m, the graphs show that sensor nodes in EEUC, improved LEACH, and LEACH nodes died earlier compared to EEUCLC because their sensor nodes became thinly scattered and thus consumed more energy to convey their data over the long distance to their respective cluster.
Moreover, some cluster head nodes in improved LEACH and LEACH consumed more energy to convey their data directly over a long distance to the base station.Since cluster heads consume energy based on the number of nodes within a cluster, the cluster heads in EEUC with low energy located far away base station died earlier.This is because EEUC is an unequal clustering method, where clusters far away from base station have a larger size than clusters near the base station.EEUCLC overcame these issues by convening data to the respective cluster head using chain schema, and so nodes having low residual energy at a long distance from the base station had a low probability when competing for the final cluster head.Figure 13 displays the variance of energy consumption by cluster heads in 20 sampled rounds.It shows that EEUCLC balanced the energy consumption between cluster heads better than other schemes.This is because the cluster heads distribution in LEACH and improved LEACH was not controllable; thus the number of nodes within clusters varied too much, while, in EEUC, some cluster heads relayed all aggregated data received by multiple cluster heads.Hence, some cluster heads consumed more energy than others.EEUCLC avoided the hot spot problem by utilizing its suboptimal multihop routing mechanism.
Figure 14 exhibits the number of rounds until 1%, 25%, 50%, and 100% of nodes died in a 200 m × 200 m field.In this field size, sensor nodes started to die at a more rate after about 20% of the nodes had died.This was due to the distances between the nodes which became larger, and nodes had to become leaders more often, causing the energy to deplete quickly.EEUCLC achieved approximately 1x the number of

Conclusion
In this paper, we proposed EEUCLS, a novel multiple chain construction protocol capable of data aggregation and conveying data to a base station for WSNs.The proposed protocol provides balancing the energy consumption among the cluster heads, preserving energy consumption of the nodes within the cluster, and reducing accelerated energy consumption of cluster heads.To support multihop routing in EEUCLS, we presented an unequal chain length clustering and a suboptimal multihop routing protocol to alleviate the burden on the cluster heads and prolong the lifetime of the sensor network.
In addition EEUCLS can also work in a very variable sensor networks domain, for example, integrated navigation system with various sensors (GNSS, GPS, and Speed Log) because it can secure the availability, consistency, and synchronization of the information from the various sensors.Simulation results show that our unequal clustering protocol clearly improved the network lifetime and balanced the energy consumption by the cluster heads compared to LEACH, EEUC, and improved LEACH.

2 WirelessFigure 1 :
Figure 1: Various applications of WSN in a smart city.

Figure 7 :
Figure 7: Chain construction and data transmission between nodes: (a) the closest node to the cluster head joining the chain first, (b) the intermediate nodes joining the chain, (c) termination of chain construction, and (d) relaying data to the designated cluster head.

Figure 8 :
Figure 8: An overview of the EEUCLC cluster formation.

Figure 9 :Figure 10 :
Figure 9: Suboptimal multihop routing: (a) message propagation, (b) the distance from the cluster head (CH) to the base station smaller than the threshold distance, (c) suboptimal routes selection, and (d) and (e) random selection for the relaying route.

Figure 11 :
Figure 11: The time until the first node dies.

Figure 12 :Figure 13 :
Figure 12: The time until the last node dies.

Figure 14 :
Figure 14: Performance results for a 200 m × 200 m network with initial energy 1 J/node.