# A Distributed Unequal Clustering Routing Protocol Based on the Improved Sine Cosine Algorithm for WSN

Authors: Fang Zhu; Wenhao Wang
Journal: Journal of Sensors
 (2022)

---

## Abstract

In order to balance the overall energy consumption and improve the energy efficiency of wireless sensor network (WSN), a distributed energy-balanced unequal clustering routing protocol based on the improved sine cosine algorithm (DUCISCA) is proposed. Firstly, DUCISCA adopts a time-based cluster head competition algorithm. In this algorithm, the broadcast time depends on the residual energy of the candidate cluster head, the distance to the base station, and the number of neighbour nodes. Secondly, a competition radius considering the distance from node to base station and the residual energy of node is proposed. It can balance energy consumption of nodes in different locations to avoid the “hot spot” problem. At the same time, it adopts a time-based broadcast mechanism. The waiting time depends on the residual energy of CCHs, the distance to the BS, and the number of neighbour nodes, which can effectively reduce the overhead of nodes. Thirdly, the energy of cluster head, the number of neighbour nodes, and the distance from the ordinary node to the cluster heads need to be taken into account to get a better clustering result. Finally, in order to speed up convergence and improve the ability to jump out of local optimum, the improved sine-cosine algorithm (ISCA) based on Latin hypercube sampling and adaptive mutation is proposed. The improvement strategies adopted by ISCA are expressed as follows: Firstly, the diversity of the population is enhanced through LHS population initialization. Secondly, the adaptive weight strategy is introduced to accelerate the convergence speed of the algorithm. Finally, the population is disturbed by Gaussian mutation or Levy flight to jump out of the local optimum. The standard deviation of cluster heads’ residual energy in intercluster communication is taken as the objective function to search the energy-balanced intercluster data forwarding path based on ISCA. Compared with EEUC, DEBUC, I-EEUC, and M-DEBUC, the simulation results prove that DUCISCA can effectively balance the overall network energy consumption and prolong the network lifetime.


---

## Body

## 1. Introduction

With the rapid development of MEMS and wireless communication technology, wireless sensor network (WSN) has been widely used in many fields, such as environmental monitoring, emergency rescue, medical care, intelligent agriculture, various commercial applications, and military fields [1]. WSN is a self-organizing wireless communication network system which consists of a large number of homogeneous sensor nodes with limited energy deployed in relatively poor environments, base stations (BSs) (or sink nodes), and terminal systems [2]. The sensor nodes communicate through radio within the network, and they are randomly distributed in the monitoring region to collect the information and transmit the information to the BS (or sink node) by single hop or multihop. Users can manage the operation of the WSN through the terminal. Due to the intensive network deployment and unattended character of WSN, the nodes’ energy cannot be replenished in time [3]. Therefore, how to balance the energy consumption of the network and prolong the network lifetime has become the key problem of WSN.Clustering technology for WSN has many advantages, such as high energy efficiency, collision avoidance, and low delay. However, clustering protocols have also some problems. In a large scale of network, cluster-based protocols mostly adopt multihop routing in order to save energy. In this situation, the CHs near BS will undertake more data forwarding tasks, which is easy to cause the CHs to run out of energy earlier than other nodes. It leads to network coverage vulnerabilities and data loss. That is “hot spot” problem.In order to improve these problems mentioned above, a distributed unequal clustering routing protocol based on the improved sine cosine algorithm (DUCISCA) is proposed in this paper, which self-organizes networks through unequal clustering and intercluster multihop routing. DUCISCA is a distributed competition algorithm. CHs are selected by competition. The competition range of nodes varies unevenly with the distance from BS and the residual energy of nodes, which can effectively balance the energy consumption of nodes in different locations. An improved sine-cosine algorithm (ISCA) based on Latin hypercube sampling and adaptive mutation is proposed and applied to intercluster multihop routing to obtain the near optimal multihop path, so as to balance the energy consumption of network.According to above discussion, our contributions are concluded as follows:(1)
We have adopted a time-based broadcast technology to select CHs, and the waiting time of CHs is related to the residual energy of CCHs, the distance to the BS, and the number of neighbour nodes, which can effectively reduce the overhead of nodes(2)
We have presented a cluster formation scheme which considers energy, distance, and the number of neighbour nodes to obtain better clustering effect(3)
We have proposed an improved sine-cosine algorithm (ISCA) based on Latin hypercube sampling and adaptive mutation, which achieves good results on 6 standard test functions. And we have applied ISCA to intercluster multihop routing to obtain the near optimal multihop path, so as to balance the energy consumption of networkThe rest of this paper is organized as follows. Some well-known routing protocols proposed for WSN are summarized in “Related Works”. “System Model” describes the network model and energy model in this work. “DUCISCA Protocol” describes proposed unequal clustering routing protocol DUCISCA in detail. “Simulation Experiments and Analysis” presents the simulations and performance evaluation of DUCISCA. At last, “Conclusion” summarizes this paper.


## 2. Related Works

Earlier clustering routing protocols usually adopted the method of uniform clustering [4] to divide the whole network into clusters with equal size. The number of members and the cluster radius is approximately equal in each cluster. Heinzelman et al. [5] proposed a low-energy adaptive clustering hierarchy (LEACH), a clustering-based protocol that utilizes randomized rotation of CHs to evenly distribute the energy load among the sensors in the network. Younis and Fahmy [6] presented a hybrid energy-efficient distributed clustering approach (HEED) that periodically selects CHs according to a hybrid of the node residual energy and a secondary parameter (node proximity to its neighbours or node degree). Thakkar and Kotecha [7] proposed a coverage routing protocol based on LEACH (CVLEACH) to make uniform distribution of CHs by creating nonoverlapped cluster regions using overhearing properties of the sensor nodes, which prolongs lifetime of WSN. In uniform clustering routing protocols, CH selection is an important challenge that directly affects the network performance [8]. A protocol for analyzing energy-delay trade-off (EDIT) [9] is proposed, which can better balance nodes’ energy consumption and reduce transmission delay. Thakkar and Kotecha [10] presented a new CH election protocol inspired from Bollinger Bands. Simulation result shows significant improvement in the network lifetime in comparison with other decentralized and ant-based algorithms. Daniel et al. [11] proposed an effective method named tunicate swarm butterfly optimization algorithm (TSBOA) is developed for selecting CH to accomplish effective data transmission between the sensor nodes. Although these protocols can balance the energy consumption, the overall energy consumption of the network is still very high due to the single-hop routing method. Therefore, in order to reduce the energy consumption of CHs, researchers propose many multihop routing protocols, such as EM-LEACH [12], IEE-LEACH [13], and DMEERP [14]. Multihop routing can reduce the energy consumption of CHs far away from the BS, but more data forwarding tasks fall on CHs closer to the BS, resulting in excessive energy consumption and premature failure. It will cause “hot spot” problem and premature death of network lifetime.From the above analysis, it can be seen that the energy consumption among clusters is unbalanced whether the uniform clustering protocols use single-hop or multihop routing. So many researchers propose unequal clustering routing protocols. In unequal clustering, the cluster size varies proportionally to the distance to BS. Energy conservation and eliminating hot spot problem are the most common objectives of unequal clustering [15]. UCS [16] proposed the idea of unequal clustering for the first time to balance energy consumption of CHs. EEUC [17] partitions the nodes into clusters of unequal size, and clusters closer to the BS have smaller sizes than those farther away from the BS. For intercluster communication, EEUC adopts an energy-aware multihop routing system considering residual energy of CHs to balance the energy consumption of network. I-EEUC [18] improves the CH selection algorithm based on EEUC. CH elections adopt a timed broadcast mechanism to select CHs reasonably, which prolongs the network lifetime compared with EEUC. Jiang et al. [19] proposed a distributed energy-balanced unequal clustering routing protocol (DEBUC). DEBUC adopts a time-based competitive algorithm to select CHs. For intercluster routing, it takes into account the residual energy of nodes, the cost of intracluster, and intercluster communication. The simulation results show that it has better performance than LEACH, EEUC, and I-EEUC. Based on DEBUC, M-DEBUC [20] has improved its candidate CH election method, competition radius, and wait time. The simulation results show that it has better performance than DEBUC.


## 3. System Model

### 3.1. Network Model

Let us consider a sensor network consisting ofN sensor nodes uniformly deployed over a two-dimensional (2D) square area. We denote the i-th sensor by Si and the corresponding sensor node set S=S1,S2,⋯,SN, where S=N. We make some assumptions about the sensor network model [21]:
(1)
There is a base station with unlimited energy located far away from the square sensing field. Sensors and the base station are all stationary after deployment(2)
All nodes are homogeneous and have the same capabilities. Each node is assigned a unique identifier (ID)(3)
All nodes have similar capabilities and equal status and can act as cluster head nodes or ordinary nodes(4)
Nodes can use power control to vary the amount of transmission power which depends on the distance to the receiver(5)
Data fusion technology is adopted to reduce the amount of data transmission


### 3.2. Energy Model

The radio model in this work is the same as described by [14]. With reasonable signal-to-noise ratio guaranteed, the energy consumption for node sending data is shown in (1).
(1)ETxn,d=nEelec+nεfsd2,d≤d0,nEelec+nεmpd4,d>d0,where n is the number of bits transmitted, d is the transmission distance, Eelec is the energy consumption for sending or receiving 1 bit data, εfs is the coefficient of energy consumption for amplifying radio at free-space mode, εmp is the coefficient of energy consumption for amplifying radio at multifading mode, and d0=εfs/εmp is the threshold value of distance.The energy consumption of data received by the node is(2)ERxn=nEelec.Due to the large difference of data between clusters, data fusion between clusters is not considered in this simulation. The assumptions of the data fusion model in the cluster are that the CH receivesn bit data sent by each member node and compresses it into n bit data regardless of the number of nodes in the cluster. The energy consumption for CH fusion of n bit data is
(3)EFxn,d=nEDA,where EDA (nJ/bit) is the energy consumption for fusing 1 bit data.In our simulation, communication energy consumption model parameters set toEelec=50 nJ/bit, εfs=10 pJ/bit/m2, εmp=0.0013 pJ/bit/m4, and d0=87 m.


## 3.1. Network Model

Let us consider a sensor network consisting ofN sensor nodes uniformly deployed over a two-dimensional (2D) square area. We denote the i-th sensor by Si and the corresponding sensor node set S=S1,S2,⋯,SN, where S=N. We make some assumptions about the sensor network model [21]:
(1)
There is a base station with unlimited energy located far away from the square sensing field. Sensors and the base station are all stationary after deployment(2)
All nodes are homogeneous and have the same capabilities. Each node is assigned a unique identifier (ID)(3)
All nodes have similar capabilities and equal status and can act as cluster head nodes or ordinary nodes(4)
Nodes can use power control to vary the amount of transmission power which depends on the distance to the receiver(5)
Data fusion technology is adopted to reduce the amount of data transmission


## 3.2. Energy Model

The radio model in this work is the same as described by [14]. With reasonable signal-to-noise ratio guaranteed, the energy consumption for node sending data is shown in (1).
(1)ETxn,d=nEelec+nεfsd2,d≤d0,nEelec+nεmpd4,d>d0,where n is the number of bits transmitted, d is the transmission distance, Eelec is the energy consumption for sending or receiving 1 bit data, εfs is the coefficient of energy consumption for amplifying radio at free-space mode, εmp is the coefficient of energy consumption for amplifying radio at multifading mode, and d0=εfs/εmp is the threshold value of distance.The energy consumption of data received by the node is(2)ERxn=nEelec.Due to the large difference of data between clusters, data fusion between clusters is not considered in this simulation. The assumptions of the data fusion model in the cluster are that the CH receivesn bit data sent by each member node and compresses it into n bit data regardless of the number of nodes in the cluster. The energy consumption for CH fusion of n bit data is
(3)EFxn,d=nEDA,where EDA (nJ/bit) is the energy consumption for fusing 1 bit data.In our simulation, communication energy consumption model parameters set toEelec=50 nJ/bit, εfs=10 pJ/bit/m2, εmp=0.0013 pJ/bit/m4, and d0=87 m.


## 4. DUCISCA Protocol

DUCISCA protocol adopts “round” cycle mechanism, and each round includes three stages: cluster formation, multihop routing between clusters, and data transmission. Firstly, clusters with different sizes are formed. Secondly, according to the network clustering results, multihop routing between clusters is established. Finally, the network enters stable stage to complete data transmission. Figure1 is the basic schematic diagram of DUCISCA.Figure 1
Schematic diagram of DUCISCA.


### 4.1. CH Selection Algorithm

In the CH selection stage, the broadcast radius of control message isRcomp0 to ensure that candidate cluster heads can receive message from their neighbour nodes.


#### 4.1.1. Candidate Cluster Head (CCH) Election

In practical applications of WSN, a large number of nodes are usually deployed with a high node density [22]. Therefore, it is not necessary for all nodes to be CCHs. Given an appropriate threshold T to control the proportion of CHs, in this paper, T is set to 0.4 according to [17]. Each node Si calculates the value of μ. If μ<T, node Si becomes a CCH; otherwise, node Si becomes an ordinary node and goes into a dormant state until the final cluster head election is completed. The value of μ is calculated by (4).
(4)μ=μ0EavgREi,where μ0 is a random number evenly distributed between (0,1) and Eavg is the average residual energy of all alive nodes in the network. Its calculation process is as follows: The data packets transmitted by the nodes include their own residual energy REi. After the BS receives them, the average residual energy Eavg of all alive nodes is calculated; REi denotes the residual energy of node Si. Obviously, the larger of REi, the smaller of μ, so the greater probability that Si will become a CCH.


#### 4.1.2. Calculation of Unequal Competition Radius

In DEBUC, the calculation of the competitive radius only considers the distance from the CCH to BS and ignores the energy. This may result in low-energy nodes to be the CHs, and after forming a cluster, the members in the cluster will cause an increase in the energy consumption of CHs. Therefore, a new competitive radius considering both distance and energy is proposed, and the improved competitive radius for CHvi is calculated in (5).
(5)vi.Rcomp=1−w1dmax−dvi,BSdmax−dmin−w21−REviE0×Rcomp0,where dmax and dmin are the maximum and minimum distances from the alive nodes to the BS, respectively, dvi,BS denotes the distance from vi to the BS, REvi is the residual energy of vi, w1 and w2 are both constants between (0,1), and w1+w2=1.


#### 4.1.3. Final Cluster Head (FCH) Election

Definition 1.
In DUCISCA, given maximum communication radiusRcomp0, for Si, its neighbour node set Nbri is computed as (6).
(6)Nbri=j∣di,j≤Rcomp0,j≠i,j∈N.Definition 2.
The degree ofSi is calculated as (7).
(7)degreei=Nbri.
CCHvi broadcasts competition message with Rcomp0 radius. The message content includes ID and the competition radius vi. Rcomp and the remaining energy REi. CCH vi establishes its neighbour CCH set NTi based on the received election message.
(8)NTi=vj∣dvi,vj<maxvi.Rcomp,vj.Rcomp.In the CHs’ competition stage, DEBUC adopts a time-based broadcast mechanism to calculate the waiting time. It only considers the energy factor of the nodes, which easily causes the “hot spot” problem. Therefore, this paper presents an improved waiting time that takes into account energy, distance, and node degree. The improved waiting time is calculated for CCHvi which is shown in (9).
(9)ti=k×TCH×c11−REiE0+c2dvi,BSdmax+c3degreeimaxdegree,where k is a random number evenly distributed between (0.9,1) to reduce the probability of broadcast message conflicts; TCH is the maximum duration of predefined CHs’ competition; E0 is the initial energy of vi; c1, c2, and c3 are weight factors of energy, distance, and degree, respectively, and c1+c2+c3=1. Using a time-based broadcast mechanism can reduce the number of control messages broadcast and received when CCHs compete for FCHs.BS broadcasts the CHs’ selection message CH_SEL_MSG to synchronize the time of each node. After receiving the CH_SEL_MSG message, the node starts its own clock to start timing and listen to the messages sent by other nodes.IfREi<E¯NTi (E¯NTi is the average residual energy of the neighbour nodes of vi), vi gives up the competition of FCH; otherwise, its waiting time is calculated according to (9). It is to be noted from (9) that the CCHs with larger residual energy, closer to the BS, and a small number of neighbour nodes have higher probability for FCH selection.The pseudo code of CH selection algorithm is shown as Algorithm1.Algorithm 1: CH selection algorithm.
Input: The locations of the BS and each node in the network, the residual energy and the maximum cluster radius of each node.Output: FCHs.1. Calculate the value ofμ according to Eq. (4)2. For every node in the network3. ifμ<T then4.  become a tentative CH5. end if6. if become a tentative CH, then7.  broadcast COMPETE_MSG(ID,Rcomp, REi)8. else9.  sleep10. end if11. For every tentative nodevi12. On receiving a COMPETE_MSG from tentative CHvj13. ifdvi,vj<maxvi.Rcomp,vj.Rcomp.14.  addvj to vi neighbour set NTi15. end if16. For every tentative nodevi17. ifREi≥E¯NTi18.  calculateti according to Eq. (9)19. else20.  give up the competition and become an ordinary node21. end if22. BS broadcasts CH_SEL_MSG to synchronize the time of each node23. For every tentative nodevi24while (the timerTCH is not expired)25.  ifCurrentTime<ti26.   if (heard SUCCESS_MSG from a neighbourNTi)27.      give up the competition and stop the timerti28.   end if29.  else ifCurrentTime==ti30.vi become FCH31.   SUCCESS_MSG(ID)32.  end if33. end while


### 4.2. Cluster Formation

After the CH selection is completed, the ordinary nodes quit the sleep statue and the CHs broadcast CH_ADV_MSG message in the network area. In DEBUC, ordinary nodes join the closest cluster according to the strength of the received signal, which is easy to cause uneven energy consumption. In this case, how to select an optimal cluster to join is a key issue of unequal clustering [23]. To solve this problem, a fitness function is set to each CH, which comprehensively considers the energy, degree of CH, and the distance between ordinary nodes and CH. The fitness function is calculated as shown in (10).
(10)fitnessi=d1Eres_iE0+d21−degreeiN+d31−dto_idto_BS,where Eres_i is the residual energy of CHi, E0 is the initial energy, degreei is the degree of CHi, N is the total number of all sensor nodes, dto_i is the distance from ordinary node to CHi, dto_BS is the distance from ordinary node to BS, d1, d2, and d3 are the weight factors, and d1+d2+d3=1.The process of cluster formation is shown as Algorithm2.Algorithm 2: Cluster formation algorithm.
Input: FCHs and the information of each node and BS.Output: Cluster structure.1. All cluster heads broadcast CH_ADV_MSG in the network area2. For every ordinary nodeOi3.flag_i =04.  For every final cluster headCHi5.   calculate distancedtoi between Oi and CHi6.   ifdto_i<Rcomp07.     calculatefitness(i) according to Eq. (10)8.   else.9.flag_i =110.   end if11.  end for12.  ifflag_i == 013.Oi join in the cluster head with the maximum fitness14.Oi send JOIN_CLUSTER_MSG to the CH15.  else16.Oi join in the cluster head with the minimum distance17.Oi send JOIN_CLUSTER_MSG to the CH18.  end if19. end for20. unequal clustering completeFigure2 is an example of unequal clustering of DUCISCA, in which the BS is located at (100,250). As can be seen from this figure, the size of each cluster is different, which achieves the effect of unequal clustering.Figure 2
An example of unequal clustering for DUCISCA.


### 4.3. Intercluster Multihop Routing

In order to balance the energy consumption between clusters, ISCA is used to implement multihop routing between clusters. Each CH adopts ISCA to select its relay node in the list of neighbour CHs. The CH transmits the data collected from the members of the cluster to the relay node. The intercluster multihop routing is established, and the CH sends the data to the BS along the optimal path.


#### 4.3.1. Sine-Cosine Algorithm (SCA)

The principle of SCA [24] is simple and easy to implement. It only adopts the properties of sine and cosine functions to achieve global exploration and local development of search space and continuously optimizes the solution set of objective functions through iterative evolution. Assume that there are N search agents in the D-dimensional search space, where the location of the i-th search agent can be expressed as xi=xi1,xi2,⋯,xiD,i∈1,2,⋯,N. The process of optimizing the objective function with SCA is as follows.Firstly, the locations ofN search agents are randomly initialized in the search space. Secondly, the individual fitness values are calculated based on the objective function. Finally, the current optimal individual locations are selected and saved. In each iteration of the algorithm, the individual updates the position according to (11).
(11)xidt+1=xidt+r1×sinr2×r3Pdt−xidt,r4<0.5,xidt+r1×cosr2×r3Pdt−xidt,r4≥0.5,where t is the current iteration, xidt is the position of the i-th solution in d-th dimension at t-th iteration, and Pdt is the position of the global optimal solution in the d-th dimension at t-th iteration. There four main parameters in (11), where r1=21−t/T (T is the maximum number of iterations) is the sine-cosine amplitude adjustment factor, and r1 determines the direction of the next iteration of the i-th individual; r2∈0,2π, r3∈0,2, and r4∈0,1 are random numbers, where r2 determines the distance for the next iteration of the i-th individual, r3 is the weight factor of the global optimal individual, and r4 is the discriminant coefficient.


#### 4.3.2. The Improved SCA Based on Latin Hypercube Sampling and Adaptive Mutation (ISCA)

(1)
Population initialization strategy based on Latin hypercube sampling (LHS)LHS [25] method is a multidimensional stratified sampling technology proposed by McKay et al. It can efficiently sample in the distribution interval of variables. Its essence is to divide the interval [0,1] into N equally spaced nonoverlapping subintervals and conduct independent equal probability sampling for each subinterval, so as to ensure that the sampling points are evenly distributed in the whole distribution interval.
(2)
Adaptive weight strategyAffected by the particle swarm optimization (PSO) algorithm [26], this paper adds a weight factor to the original position update formula to speed up the convergence of the algorithm. The new position update formula is shown in (12).
(12)xidt+1=wt⋅xidt+r1×sinr2×r3Pdt−xidt,r4<0.5,wt⋅xidt+r1×cosr2×r3Pdt−xidt,r4≥0.5,where wt is the weight factor. Its calculation is shown in (13).
(13)wt=0.2⋅cosπ2⋅1−tMax_iter,where t is the current iteration and Max_iter is the maximum iteration.
(3)
Disturbance strategyIn order to expand the local search ability, Gaussian variation and Levy flight strategy are introduced to make the individuals trapped in local extreme points jump out of the limit and continue the search.Gaussian variation [27] comes from the normal distribution of continuous probability distribution, which has good local development ability. The variation formula is
(14)mutationx=x⋅1+randn1.Levy flight [28] obeys the Levy distribution. Please refer to [28] for specific mathematical model. The variation formula is
(15)mutationx=x+x−gbest⊗Levyλ,where x is the original position, mutationx is the position after Gaussian variation or Levy flight, ⊗ denotes point to point multiplication, randn1 is a random number obeying standard normal distribution, and Levyλ is the random vector obeying Levy flight.


#### 4.3.3. Performance of ISCA

In order to verify the performance of ISCA, this paper compares ISCA with BOA [29], WOA [30], SSA [31], and SCA. The population size N=30 and the maximum iteration Max_iter=500 are set, respectively. Each algorithm operates 30 times independently, and the worst, optimal, average, and standard deviation of these 30 experiments are taken as evaluation indexes. This paper takes the first six 50-dimensional test functions in [32] as examples. The theoretical optimal function values are all 0. Table 1 shows the optimal value, the worst value, the mean value, and the standard deviation of the results obtained from each algorithm running 30 times.Table 1
Comparison of optimization performance of 5 algorithms under fixed iteration times.
AlgorithmsFunctionsOptimumWorstMeanStdFunctionsOptimumWorstMeanStdBOA1.34E-111.75E-111.58E-119.45E-134.57E-121.36E-117.81E-122.30E-12WOA4.89E-803.21E-642.12E-657.75E-6501.46E-014.87E-022.67E-02SSAf102.48E-688.29E-074.53E-69f40000SCA1.48E+074.80E+101.01E+101.08E+105.46E-012.06E+001.15E+003.19E-01ISCA00000000BOA8.07E+762.95E+901.05E+895.37E+8903.81E+023.61E+011.10E+02WOA6.20E-1293.25E-781.09E-795.94E-7901.14E-133.79E-152.08E-14SSAf26.92E-1901.69E-456.29E-473.10E-46f50000SCA2.29E+212.64E+471.19E+465.04E+461.35E+025.38E+031.82E+031.43E+03ISCA00000000BOA1.09E-111.46E-111.27E-119.29E-1301.80E+012.68E+006.09E+00WOA5.81E+041.20E+059.29E+041.69E+0401.43E+014.78E-012.62E+00SSAf306.77E-562.26E-571.24E-56f60000SCA3.40E+032.73E+041.11E+044.76E+036.42E+001.89E+021.35E+012.84E+00ISCA00000000Through the function optimization simulation experiments of five representative comparison algorithms on 6 different feature benchmark functions, the test results prove that the optimization accuracy and stability of ISCA are significantly improved.


#### 4.3.4. Routing Based on ISCA

Suppose there are eight CHs in the network, and the CHs’ set isCH1,CH2,⋯,CH8. N individuals are randomly generated in the range of (0,1), in which the dimension of the individual is the number of CHs, and each individual represents a multihop path.CHi takes δ times of the competition radius as the broadcast range. Other prior CHs and the BS that receive this message will become CHi’s neighbour CHs. CHd selects the nd-th CH in its neighbouring CHs’ set as the final relay node. The value of nd is calculated as shown in (16).
(16)nd=xid×NeiNumCHd,where xid is the d-th dimensional value of the i-th individual, which denotes the probability that CHd selects the relay node and NeiNumCHd indicates the number of neighbouring CHs of CHd.In order to reduce and balance the energy consumption of CHs and prolong the network lifetime, this paper takes the standard deviation of CHs’ residual energy as the objective function of ISCA. The specific expression is shown in (17).
(17)fxi=1m∑i=1mEresi−E¯2,where m denotes the number of CHs, Eresi denotes the residual energy of CHi, and E¯ denotes the mean value of CHs’ residual energy. The residual energy of CH needs to subtract the energy consumed in intercluster communication, which is calculated as (18).
(18)Eresi=Ebefi−ERxl×PackNumi−ETxl×PackNumi,dnexti,where Ebefi denotes the residual energy of CHi before intercluster communication, PackNumi denotes the number of packets received by CHi, and dnexti denotes the distance between CHi and the relay node.The pseudo code of intercluster multihop routing based on ISCA is shown in Algorithm3.Algorithm 3: Intercluster multihop routing based on ISCA.
Input: CHs and List of neighbouring CHs.Output: Routing structure.1. Random initialization population in [0,1] interval2. The multi-hop paths represented by each individual are derived from the individual location and the list of neighbouring CHs, and calculate each individual’s fitness value. Calculate initial global optimal locationgbest3. Update the individual location, fitness values and updategbest for t-th iteration according to the strategies of Algorithm 24. Skip to step 2 and continue until the maximum number of iterations is reached5. Routing structure corresponding to outputgbestThe flow chart of the implementation of DUCISCA protocol is shown in Figure3.Figure 3
The flow chart of DUCISCA protocol.


## 4.1. CH Selection Algorithm

In the CH selection stage, the broadcast radius of control message isRcomp0 to ensure that candidate cluster heads can receive message from their neighbour nodes.


### 4.1.1. Candidate Cluster Head (CCH) Election

In practical applications of WSN, a large number of nodes are usually deployed with a high node density [22]. Therefore, it is not necessary for all nodes to be CCHs. Given an appropriate threshold T to control the proportion of CHs, in this paper, T is set to 0.4 according to [17]. Each node Si calculates the value of μ. If μ<T, node Si becomes a CCH; otherwise, node Si becomes an ordinary node and goes into a dormant state until the final cluster head election is completed. The value of μ is calculated by (4).
(4)μ=μ0EavgREi,where μ0 is a random number evenly distributed between (0,1) and Eavg is the average residual energy of all alive nodes in the network. Its calculation process is as follows: The data packets transmitted by the nodes include their own residual energy REi. After the BS receives them, the average residual energy Eavg of all alive nodes is calculated; REi denotes the residual energy of node Si. Obviously, the larger of REi, the smaller of μ, so the greater probability that Si will become a CCH.


### 4.1.2. Calculation of Unequal Competition Radius

In DEBUC, the calculation of the competitive radius only considers the distance from the CCH to BS and ignores the energy. This may result in low-energy nodes to be the CHs, and after forming a cluster, the members in the cluster will cause an increase in the energy consumption of CHs. Therefore, a new competitive radius considering both distance and energy is proposed, and the improved competitive radius for CHvi is calculated in (5).
(5)vi.Rcomp=1−w1dmax−dvi,BSdmax−dmin−w21−REviE0×Rcomp0,where dmax and dmin are the maximum and minimum distances from the alive nodes to the BS, respectively, dvi,BS denotes the distance from vi to the BS, REvi is the residual energy of vi, w1 and w2 are both constants between (0,1), and w1+w2=1.


### 4.1.3. Final Cluster Head (FCH) Election

Definition 1.
In DUCISCA, given maximum communication radiusRcomp0, for Si, its neighbour node set Nbri is computed as (6).
(6)Nbri=j∣di,j≤Rcomp0,j≠i,j∈N.Definition 2.
The degree ofSi is calculated as (7).
(7)degreei=Nbri.
CCHvi broadcasts competition message with Rcomp0 radius. The message content includes ID and the competition radius vi. Rcomp and the remaining energy REi. CCH vi establishes its neighbour CCH set NTi based on the received election message.
(8)NTi=vj∣dvi,vj<maxvi.Rcomp,vj.Rcomp.In the CHs’ competition stage, DEBUC adopts a time-based broadcast mechanism to calculate the waiting time. It only considers the energy factor of the nodes, which easily causes the “hot spot” problem. Therefore, this paper presents an improved waiting time that takes into account energy, distance, and node degree. The improved waiting time is calculated for CCHvi which is shown in (9).
(9)ti=k×TCH×c11−REiE0+c2dvi,BSdmax+c3degreeimaxdegree,where k is a random number evenly distributed between (0.9,1) to reduce the probability of broadcast message conflicts; TCH is the maximum duration of predefined CHs’ competition; E0 is the initial energy of vi; c1, c2, and c3 are weight factors of energy, distance, and degree, respectively, and c1+c2+c3=1. Using a time-based broadcast mechanism can reduce the number of control messages broadcast and received when CCHs compete for FCHs.BS broadcasts the CHs’ selection message CH_SEL_MSG to synchronize the time of each node. After receiving the CH_SEL_MSG message, the node starts its own clock to start timing and listen to the messages sent by other nodes.IfREi<E¯NTi (E¯NTi is the average residual energy of the neighbour nodes of vi), vi gives up the competition of FCH; otherwise, its waiting time is calculated according to (9). It is to be noted from (9) that the CCHs with larger residual energy, closer to the BS, and a small number of neighbour nodes have higher probability for FCH selection.The pseudo code of CH selection algorithm is shown as Algorithm1.Algorithm 1: CH selection algorithm.
Input: The locations of the BS and each node in the network, the residual energy and the maximum cluster radius of each node.Output: FCHs.1. Calculate the value ofμ according to Eq. (4)2. For every node in the network3. ifμ<T then4.  become a tentative CH5. end if6. if become a tentative CH, then7.  broadcast COMPETE_MSG(ID,Rcomp, REi)8. else9.  sleep10. end if11. For every tentative nodevi12. On receiving a COMPETE_MSG from tentative CHvj13. ifdvi,vj<maxvi.Rcomp,vj.Rcomp.14.  addvj to vi neighbour set NTi15. end if16. For every tentative nodevi17. ifREi≥E¯NTi18.  calculateti according to Eq. (9)19. else20.  give up the competition and become an ordinary node21. end if22. BS broadcasts CH_SEL_MSG to synchronize the time of each node23. For every tentative nodevi24while (the timerTCH is not expired)25.  ifCurrentTime<ti26.   if (heard SUCCESS_MSG from a neighbourNTi)27.      give up the competition and stop the timerti28.   end if29.  else ifCurrentTime==ti30.vi become FCH31.   SUCCESS_MSG(ID)32.  end if33. end while


## 4.1.1. Candidate Cluster Head (CCH) Election

In practical applications of WSN, a large number of nodes are usually deployed with a high node density [22]. Therefore, it is not necessary for all nodes to be CCHs. Given an appropriate threshold T to control the proportion of CHs, in this paper, T is set to 0.4 according to [17]. Each node Si calculates the value of μ. If μ<T, node Si becomes a CCH; otherwise, node Si becomes an ordinary node and goes into a dormant state until the final cluster head election is completed. The value of μ is calculated by (4).
(4)μ=μ0EavgREi,where μ0 is a random number evenly distributed between (0,1) and Eavg is the average residual energy of all alive nodes in the network. Its calculation process is as follows: The data packets transmitted by the nodes include their own residual energy REi. After the BS receives them, the average residual energy Eavg of all alive nodes is calculated; REi denotes the residual energy of node Si. Obviously, the larger of REi, the smaller of μ, so the greater probability that Si will become a CCH.


## 4.1.2. Calculation of Unequal Competition Radius

In DEBUC, the calculation of the competitive radius only considers the distance from the CCH to BS and ignores the energy. This may result in low-energy nodes to be the CHs, and after forming a cluster, the members in the cluster will cause an increase in the energy consumption of CHs. Therefore, a new competitive radius considering both distance and energy is proposed, and the improved competitive radius for CHvi is calculated in (5).
(5)vi.Rcomp=1−w1dmax−dvi,BSdmax−dmin−w21−REviE0×Rcomp0,where dmax and dmin are the maximum and minimum distances from the alive nodes to the BS, respectively, dvi,BS denotes the distance from vi to the BS, REvi is the residual energy of vi, w1 and w2 are both constants between (0,1), and w1+w2=1.


## 4.1.3. Final Cluster Head (FCH) Election

Definition 1.
In DUCISCA, given maximum communication radiusRcomp0, for Si, its neighbour node set Nbri is computed as (6).
(6)Nbri=j∣di,j≤Rcomp0,j≠i,j∈N.Definition 2.
The degree ofSi is calculated as (7).
(7)degreei=Nbri.
CCHvi broadcasts competition message with Rcomp0 radius. The message content includes ID and the competition radius vi. Rcomp and the remaining energy REi. CCH vi establishes its neighbour CCH set NTi based on the received election message.
(8)NTi=vj∣dvi,vj<maxvi.Rcomp,vj.Rcomp.In the CHs’ competition stage, DEBUC adopts a time-based broadcast mechanism to calculate the waiting time. It only considers the energy factor of the nodes, which easily causes the “hot spot” problem. Therefore, this paper presents an improved waiting time that takes into account energy, distance, and node degree. The improved waiting time is calculated for CCHvi which is shown in (9).
(9)ti=k×TCH×c11−REiE0+c2dvi,BSdmax+c3degreeimaxdegree,where k is a random number evenly distributed between (0.9,1) to reduce the probability of broadcast message conflicts; TCH is the maximum duration of predefined CHs’ competition; E0 is the initial energy of vi; c1, c2, and c3 are weight factors of energy, distance, and degree, respectively, and c1+c2+c3=1. Using a time-based broadcast mechanism can reduce the number of control messages broadcast and received when CCHs compete for FCHs.BS broadcasts the CHs’ selection message CH_SEL_MSG to synchronize the time of each node. After receiving the CH_SEL_MSG message, the node starts its own clock to start timing and listen to the messages sent by other nodes.IfREi<E¯NTi (E¯NTi is the average residual energy of the neighbour nodes of vi), vi gives up the competition of FCH; otherwise, its waiting time is calculated according to (9). It is to be noted from (9) that the CCHs with larger residual energy, closer to the BS, and a small number of neighbour nodes have higher probability for FCH selection.The pseudo code of CH selection algorithm is shown as Algorithm1.Algorithm 1: CH selection algorithm.
Input: The locations of the BS and each node in the network, the residual energy and the maximum cluster radius of each node.Output: FCHs.1. Calculate the value ofμ according to Eq. (4)2. For every node in the network3. ifμ<T then4.  become a tentative CH5. end if6. if become a tentative CH, then7.  broadcast COMPETE_MSG(ID,Rcomp, REi)8. else9.  sleep10. end if11. For every tentative nodevi12. On receiving a COMPETE_MSG from tentative CHvj13. ifdvi,vj<maxvi.Rcomp,vj.Rcomp.14.  addvj to vi neighbour set NTi15. end if16. For every tentative nodevi17. ifREi≥E¯NTi18.  calculateti according to Eq. (9)19. else20.  give up the competition and become an ordinary node21. end if22. BS broadcasts CH_SEL_MSG to synchronize the time of each node23. For every tentative nodevi24while (the timerTCH is not expired)25.  ifCurrentTime<ti26.   if (heard SUCCESS_MSG from a neighbourNTi)27.      give up the competition and stop the timerti28.   end if29.  else ifCurrentTime==ti30.vi become FCH31.   SUCCESS_MSG(ID)32.  end if33. end while


## 4.2. Cluster Formation

After the CH selection is completed, the ordinary nodes quit the sleep statue and the CHs broadcast CH_ADV_MSG message in the network area. In DEBUC, ordinary nodes join the closest cluster according to the strength of the received signal, which is easy to cause uneven energy consumption. In this case, how to select an optimal cluster to join is a key issue of unequal clustering [23]. To solve this problem, a fitness function is set to each CH, which comprehensively considers the energy, degree of CH, and the distance between ordinary nodes and CH. The fitness function is calculated as shown in (10).
(10)fitnessi=d1Eres_iE0+d21−degreeiN+d31−dto_idto_BS,where Eres_i is the residual energy of CHi, E0 is the initial energy, degreei is the degree of CHi, N is the total number of all sensor nodes, dto_i is the distance from ordinary node to CHi, dto_BS is the distance from ordinary node to BS, d1, d2, and d3 are the weight factors, and d1+d2+d3=1.The process of cluster formation is shown as Algorithm2.Algorithm 2: Cluster formation algorithm.
Input: FCHs and the information of each node and BS.Output: Cluster structure.1. All cluster heads broadcast CH_ADV_MSG in the network area2. For every ordinary nodeOi3.flag_i =04.  For every final cluster headCHi5.   calculate distancedtoi between Oi and CHi6.   ifdto_i<Rcomp07.     calculatefitness(i) according to Eq. (10)8.   else.9.flag_i =110.   end if11.  end for12.  ifflag_i == 013.Oi join in the cluster head with the maximum fitness14.Oi send JOIN_CLUSTER_MSG to the CH15.  else16.Oi join in the cluster head with the minimum distance17.Oi send JOIN_CLUSTER_MSG to the CH18.  end if19. end for20. unequal clustering completeFigure2 is an example of unequal clustering of DUCISCA, in which the BS is located at (100,250). As can be seen from this figure, the size of each cluster is different, which achieves the effect of unequal clustering.Figure 2
An example of unequal clustering for DUCISCA.


## 4.3. Intercluster Multihop Routing

In order to balance the energy consumption between clusters, ISCA is used to implement multihop routing between clusters. Each CH adopts ISCA to select its relay node in the list of neighbour CHs. The CH transmits the data collected from the members of the cluster to the relay node. The intercluster multihop routing is established, and the CH sends the data to the BS along the optimal path.


### 4.3.1. Sine-Cosine Algorithm (SCA)

The principle of SCA [24] is simple and easy to implement. It only adopts the properties of sine and cosine functions to achieve global exploration and local development of search space and continuously optimizes the solution set of objective functions through iterative evolution. Assume that there are N search agents in the D-dimensional search space, where the location of the i-th search agent can be expressed as xi=xi1,xi2,⋯,xiD,i∈1,2,⋯,N. The process of optimizing the objective function with SCA is as follows.Firstly, the locations ofN search agents are randomly initialized in the search space. Secondly, the individual fitness values are calculated based on the objective function. Finally, the current optimal individual locations are selected and saved. In each iteration of the algorithm, the individual updates the position according to (11).
(11)xidt+1=xidt+r1×sinr2×r3Pdt−xidt,r4<0.5,xidt+r1×cosr2×r3Pdt−xidt,r4≥0.5,where t is the current iteration, xidt is the position of the i-th solution in d-th dimension at t-th iteration, and Pdt is the position of the global optimal solution in the d-th dimension at t-th iteration. There four main parameters in (11), where r1=21−t/T (T is the maximum number of iterations) is the sine-cosine amplitude adjustment factor, and r1 determines the direction of the next iteration of the i-th individual; r2∈0,2π, r3∈0,2, and r4∈0,1 are random numbers, where r2 determines the distance for the next iteration of the i-th individual, r3 is the weight factor of the global optimal individual, and r4 is the discriminant coefficient.


### 4.3.2. The Improved SCA Based on Latin Hypercube Sampling and Adaptive Mutation (ISCA)

(1)
Population initialization strategy based on Latin hypercube sampling (LHS)LHS [25] method is a multidimensional stratified sampling technology proposed by McKay et al. It can efficiently sample in the distribution interval of variables. Its essence is to divide the interval [0,1] into N equally spaced nonoverlapping subintervals and conduct independent equal probability sampling for each subinterval, so as to ensure that the sampling points are evenly distributed in the whole distribution interval.
(2)
Adaptive weight strategyAffected by the particle swarm optimization (PSO) algorithm [26], this paper adds a weight factor to the original position update formula to speed up the convergence of the algorithm. The new position update formula is shown in (12).
(12)xidt+1=wt⋅xidt+r1×sinr2×r3Pdt−xidt,r4<0.5,wt⋅xidt+r1×cosr2×r3Pdt−xidt,r4≥0.5,where wt is the weight factor. Its calculation is shown in (13).
(13)wt=0.2⋅cosπ2⋅1−tMax_iter,where t is the current iteration and Max_iter is the maximum iteration.
(3)
Disturbance strategyIn order to expand the local search ability, Gaussian variation and Levy flight strategy are introduced to make the individuals trapped in local extreme points jump out of the limit and continue the search.Gaussian variation [27] comes from the normal distribution of continuous probability distribution, which has good local development ability. The variation formula is
(14)mutationx=x⋅1+randn1.Levy flight [28] obeys the Levy distribution. Please refer to [28] for specific mathematical model. The variation formula is
(15)mutationx=x+x−gbest⊗Levyλ,where x is the original position, mutationx is the position after Gaussian variation or Levy flight, ⊗ denotes point to point multiplication, randn1 is a random number obeying standard normal distribution, and Levyλ is the random vector obeying Levy flight.


### 4.3.3. Performance of ISCA

In order to verify the performance of ISCA, this paper compares ISCA with BOA [29], WOA [30], SSA [31], and SCA. The population size N=30 and the maximum iteration Max_iter=500 are set, respectively. Each algorithm operates 30 times independently, and the worst, optimal, average, and standard deviation of these 30 experiments are taken as evaluation indexes. This paper takes the first six 50-dimensional test functions in [32] as examples. The theoretical optimal function values are all 0. Table 1 shows the optimal value, the worst value, the mean value, and the standard deviation of the results obtained from each algorithm running 30 times.Table 1
Comparison of optimization performance of 5 algorithms under fixed iteration times.
AlgorithmsFunctionsOptimumWorstMeanStdFunctionsOptimumWorstMeanStdBOA1.34E-111.75E-111.58E-119.45E-134.57E-121.36E-117.81E-122.30E-12WOA4.89E-803.21E-642.12E-657.75E-6501.46E-014.87E-022.67E-02SSAf102.48E-688.29E-074.53E-69f40000SCA1.48E+074.80E+101.01E+101.08E+105.46E-012.06E+001.15E+003.19E-01ISCA00000000BOA8.07E+762.95E+901.05E+895.37E+8903.81E+023.61E+011.10E+02WOA6.20E-1293.25E-781.09E-795.94E-7901.14E-133.79E-152.08E-14SSAf26.92E-1901.69E-456.29E-473.10E-46f50000SCA2.29E+212.64E+471.19E+465.04E+461.35E+025.38E+031.82E+031.43E+03ISCA00000000BOA1.09E-111.46E-111.27E-119.29E-1301.80E+012.68E+006.09E+00WOA5.81E+041.20E+059.29E+041.69E+0401.43E+014.78E-012.62E+00SSAf306.77E-562.26E-571.24E-56f60000SCA3.40E+032.73E+041.11E+044.76E+036.42E+001.89E+021.35E+012.84E+00ISCA00000000Through the function optimization simulation experiments of five representative comparison algorithms on 6 different feature benchmark functions, the test results prove that the optimization accuracy and stability of ISCA are significantly improved.


### 4.3.4. Routing Based on ISCA

Suppose there are eight CHs in the network, and the CHs’ set isCH1,CH2,⋯,CH8. N individuals are randomly generated in the range of (0,1), in which the dimension of the individual is the number of CHs, and each individual represents a multihop path.CHi takes δ times of the competition radius as the broadcast range. Other prior CHs and the BS that receive this message will become CHi’s neighbour CHs. CHd selects the nd-th CH in its neighbouring CHs’ set as the final relay node. The value of nd is calculated as shown in (16).
(16)nd=xid×NeiNumCHd,where xid is the d-th dimensional value of the i-th individual, which denotes the probability that CHd selects the relay node and NeiNumCHd indicates the number of neighbouring CHs of CHd.In order to reduce and balance the energy consumption of CHs and prolong the network lifetime, this paper takes the standard deviation of CHs’ residual energy as the objective function of ISCA. The specific expression is shown in (17).
(17)fxi=1m∑i=1mEresi−E¯2,where m denotes the number of CHs, Eresi denotes the residual energy of CHi, and E¯ denotes the mean value of CHs’ residual energy. The residual energy of CH needs to subtract the energy consumed in intercluster communication, which is calculated as (18).
(18)Eresi=Ebefi−ERxl×PackNumi−ETxl×PackNumi,dnexti,where Ebefi denotes the residual energy of CHi before intercluster communication, PackNumi denotes the number of packets received by CHi, and dnexti denotes the distance between CHi and the relay node.The pseudo code of intercluster multihop routing based on ISCA is shown in Algorithm3.Algorithm 3: Intercluster multihop routing based on ISCA.
Input: CHs and List of neighbouring CHs.Output: Routing structure.1. Random initialization population in [0,1] interval2. The multi-hop paths represented by each individual are derived from the individual location and the list of neighbouring CHs, and calculate each individual’s fitness value. Calculate initial global optimal locationgbest3. Update the individual location, fitness values and updategbest for t-th iteration according to the strategies of Algorithm 24. Skip to step 2 and continue until the maximum number of iterations is reached5. Routing structure corresponding to outputgbestThe flow chart of the implementation of DUCISCA protocol is shown in Figure3.Figure 3
The flow chart of DUCISCA protocol.


## 4.3.1. Sine-Cosine Algorithm (SCA)

The principle of SCA [24] is simple and easy to implement. It only adopts the properties of sine and cosine functions to achieve global exploration and local development of search space and continuously optimizes the solution set of objective functions through iterative evolution. Assume that there are N search agents in the D-dimensional search space, where the location of the i-th search agent can be expressed as xi=xi1,xi2,⋯,xiD,i∈1,2,⋯,N. The process of optimizing the objective function with SCA is as follows.Firstly, the locations ofN search agents are randomly initialized in the search space. Secondly, the individual fitness values are calculated based on the objective function. Finally, the current optimal individual locations are selected and saved. In each iteration of the algorithm, the individual updates the position according to (11).
(11)xidt+1=xidt+r1×sinr2×r3Pdt−xidt,r4<0.5,xidt+r1×cosr2×r3Pdt−xidt,r4≥0.5,where t is the current iteration, xidt is the position of the i-th solution in d-th dimension at t-th iteration, and Pdt is the position of the global optimal solution in the d-th dimension at t-th iteration. There four main parameters in (11), where r1=21−t/T (T is the maximum number of iterations) is the sine-cosine amplitude adjustment factor, and r1 determines the direction of the next iteration of the i-th individual; r2∈0,2π, r3∈0,2, and r4∈0,1 are random numbers, where r2 determines the distance for the next iteration of the i-th individual, r3 is the weight factor of the global optimal individual, and r4 is the discriminant coefficient.


## 4.3.2. The Improved SCA Based on Latin Hypercube Sampling and Adaptive Mutation (ISCA)

(1)
Population initialization strategy based on Latin hypercube sampling (LHS)LHS [25] method is a multidimensional stratified sampling technology proposed by McKay et al. It can efficiently sample in the distribution interval of variables. Its essence is to divide the interval [0,1] into N equally spaced nonoverlapping subintervals and conduct independent equal probability sampling for each subinterval, so as to ensure that the sampling points are evenly distributed in the whole distribution interval.
(2)
Adaptive weight strategyAffected by the particle swarm optimization (PSO) algorithm [26], this paper adds a weight factor to the original position update formula to speed up the convergence of the algorithm. The new position update formula is shown in (12).
(12)xidt+1=wt⋅xidt+r1×sinr2×r3Pdt−xidt,r4<0.5,wt⋅xidt+r1×cosr2×r3Pdt−xidt,r4≥0.5,where wt is the weight factor. Its calculation is shown in (13).
(13)wt=0.2⋅cosπ2⋅1−tMax_iter,where t is the current iteration and Max_iter is the maximum iteration.
(3)
Disturbance strategyIn order to expand the local search ability, Gaussian variation and Levy flight strategy are introduced to make the individuals trapped in local extreme points jump out of the limit and continue the search.Gaussian variation [27] comes from the normal distribution of continuous probability distribution, which has good local development ability. The variation formula is
(14)mutationx=x⋅1+randn1.Levy flight [28] obeys the Levy distribution. Please refer to [28] for specific mathematical model. The variation formula is
(15)mutationx=x+x−gbest⊗Levyλ,where x is the original position, mutationx is the position after Gaussian variation or Levy flight, ⊗ denotes point to point multiplication, randn1 is a random number obeying standard normal distribution, and Levyλ is the random vector obeying Levy flight.


## 4.3.3. Performance of ISCA

In order to verify the performance of ISCA, this paper compares ISCA with BOA [29], WOA [30], SSA [31], and SCA. The population size N=30 and the maximum iteration Max_iter=500 are set, respectively. Each algorithm operates 30 times independently, and the worst, optimal, average, and standard deviation of these 30 experiments are taken as evaluation indexes. This paper takes the first six 50-dimensional test functions in [32] as examples. The theoretical optimal function values are all 0. Table 1 shows the optimal value, the worst value, the mean value, and the standard deviation of the results obtained from each algorithm running 30 times.Table 1
Comparison of optimization performance of 5 algorithms under fixed iteration times.
AlgorithmsFunctionsOptimumWorstMeanStdFunctionsOptimumWorstMeanStdBOA1.34E-111.75E-111.58E-119.45E-134.57E-121.36E-117.81E-122.30E-12WOA4.89E-803.21E-642.12E-657.75E-6501.46E-014.87E-022.67E-02SSAf102.48E-688.29E-074.53E-69f40000SCA1.48E+074.80E+101.01E+101.08E+105.46E-012.06E+001.15E+003.19E-01ISCA00000000BOA8.07E+762.95E+901.05E+895.37E+8903.81E+023.61E+011.10E+02WOA6.20E-1293.25E-781.09E-795.94E-7901.14E-133.79E-152.08E-14SSAf26.92E-1901.69E-456.29E-473.10E-46f50000SCA2.29E+212.64E+471.19E+465.04E+461.35E+025.38E+031.82E+031.43E+03ISCA00000000BOA1.09E-111.46E-111.27E-119.29E-1301.80E+012.68E+006.09E+00WOA5.81E+041.20E+059.29E+041.69E+0401.43E+014.78E-012.62E+00SSAf306.77E-562.26E-571.24E-56f60000SCA3.40E+032.73E+041.11E+044.76E+036.42E+001.89E+021.35E+012.84E+00ISCA00000000Through the function optimization simulation experiments of five representative comparison algorithms on 6 different feature benchmark functions, the test results prove that the optimization accuracy and stability of ISCA are significantly improved.


## 4.3.4. Routing Based on ISCA

Suppose there are eight CHs in the network, and the CHs’ set isCH1,CH2,⋯,CH8. N individuals are randomly generated in the range of (0,1), in which the dimension of the individual is the number of CHs, and each individual represents a multihop path.CHi takes δ times of the competition radius as the broadcast range. Other prior CHs and the BS that receive this message will become CHi’s neighbour CHs. CHd selects the nd-th CH in its neighbouring CHs’ set as the final relay node. The value of nd is calculated as shown in (16).
(16)nd=xid×NeiNumCHd,where xid is the d-th dimensional value of the i-th individual, which denotes the probability that CHd selects the relay node and NeiNumCHd indicates the number of neighbouring CHs of CHd.In order to reduce and balance the energy consumption of CHs and prolong the network lifetime, this paper takes the standard deviation of CHs’ residual energy as the objective function of ISCA. The specific expression is shown in (17).
(17)fxi=1m∑i=1mEresi−E¯2,where m denotes the number of CHs, Eresi denotes the residual energy of CHi, and E¯ denotes the mean value of CHs’ residual energy. The residual energy of CH needs to subtract the energy consumed in intercluster communication, which is calculated as (18).
(18)Eresi=Ebefi−ERxl×PackNumi−ETxl×PackNumi,dnexti,where Ebefi denotes the residual energy of CHi before intercluster communication, PackNumi denotes the number of packets received by CHi, and dnexti denotes the distance between CHi and the relay node.The pseudo code of intercluster multihop routing based on ISCA is shown in Algorithm3.Algorithm 3: Intercluster multihop routing based on ISCA.
Input: CHs and List of neighbouring CHs.Output: Routing structure.1. Random initialization population in [0,1] interval2. The multi-hop paths represented by each individual are derived from the individual location and the list of neighbouring CHs, and calculate each individual’s fitness value. Calculate initial global optimal locationgbest3. Update the individual location, fitness values and updategbest for t-th iteration according to the strategies of Algorithm 24. Skip to step 2 and continue until the maximum number of iterations is reached5. Routing structure corresponding to outputgbestThe flow chart of the implementation of DUCISCA protocol is shown in Figure3.Figure 3
The flow chart of DUCISCA protocol.


## 5. Experimental Results and Analysis

### 5.1. Simulation Parameters

To prove the performance of DUCISCA, the EEUC, DEBUC, I-EEUC, M-DEBUC, and DUCISCA are simulated under the same conditions using MATLAB 2018a, and many performances are compared. We run for 1000 rounds, and each node transmits a data packet each round. The network parameters are shown in Table2.Table 2
Network parameters.
ParametersValuesParametersValuesNetwork coverage(0,0)~(200,200)mRcomp060 mBase station location(100,250)mc1,c2,c30.4,0.3,0.3Node number400d1,d2,d30.4,0.3,0.3Initial energy0.5 Jw1,w20.5,0.5Date packet size4000 bitsδ3Date packet header100 bitsTCH30 sT0.4


### 5.2. Analysis of Simulation Results

#### 5.2.1. CHs’ Energy Consumption

A comparative analysis of CHs’ energy consumption after 20 rounds of network clustering is made, as shown in Figure4. The average CHs’ energy consumption of I-EEUC, EEUC, DEBUC, M-DEBUC, and DUCISCA are 0.2077 J, 0.1156 J, 0.1021 J, 0.1030 J, and 0.0980 J, respectively. Obviously, CHs’ energy consumption of DUCISCA is lower than other protocols, and the energy consumption of each CH is balanced in each round. The energy consumption of CHs is related to the number of packets forwarded and the forwarding distance. DUCISCA optimizes the selection strategy of CHs and selects high-quality nodes as CHs, and the number of CHs does not change much. In addition, when establishing intercluster forwarding paths, ideal multihop paths are searched through ISCA, and data packets are forwarded accordingly; the energy consumption of intercluster communication is reduced.Figure 4
CHs’ energy consumption.


#### 5.2.2. Network Lifetime

Network lifetime is one of the important indicators to evaluate network performance [33]. Table 3 shows the first node death (FDN) and half node death (HDN) times for the five algorithms in Figure 5. If HDN is used as the criterion of network lifetime, the five algorithms have 535, 633, 603, 637, and 668 network lifetimes, respectively. Compared with EEUC, I-EEUC optimizes the CH selection algorithm for more balanced energy consumption. Compared with I-EEUC, DEBUC not only optimizes the rules of CH selection but also takes into account the residual energy of nodes and energy consumption within clusters and energy consumption between clusters in multihop routing, which further balances the network energy consumption. Compared with DEBUC, M-DEBUC improves the competitive radius and waiting time of DEBUC, so it consumes less energy than DEBUC. Compared with M-DEBUC, the proposed DUCISCA considers factors such as node energy, distance to the BS, and node degree when CCHs compete for FCHs, which is more reasonable than M-DEBUC CH selection and the FDN time is later. It can be seen from Figure 5 that DUCISCA can better balance the energy consumption between clusters, so the later death speed is slightly faster than other algorithms.Table 3
Number of dead node rounds for 5 protocols.
Protocol nameRounds of FDNRounds of HDNEEUC356535DEBUC594633I-EEUC558603M-DEBUC596637DUCISCA655668Figure 5
Network lifetime.


#### 5.2.3. Number of Packets Received by the BS

Figure6 is a comparison diagram of the number of packets received by the BS for the five protocols. Table 4 shows the final number of packets received by the BS for the five protocols. Based on this table, the number of packets received by the BS in DUCISCA is about 4.7 times that of EEUC, 3.4 times that of I-EEUC, 2.3 times that of DEBUC, and 1.2 times that of M-DEBUC. This is because the improved CH selection and multihop routing mode of DUCISCA extends the lifetime of network, especially the improved multihop routing, so that more CHs indirectly send data to the BS through multihop mode, which increases the amount of data received by the BS. Before the arrival of DUCISCA’s HDN, most nodes of the compared protocols have died, and there are coverage vulnerabilities in the monitoring area, so it is difficult for nodes to send data to the BS.Figure 6
Number of packets received by the BS.Table 4
Number of packets received by BS for 5 protocols.
Protocol nameNumber of packets received by BSEEUC3730DEBUC7549I-EEUC5075M-DEBUC14101DUCISCA17312


#### 5.2.4. Network Average Residual Energy

Figure7 compares the variation of the network average residual energy for the five protocols with the number of running rounds. Because EEUC only considers energy in routing, the intercluster routing is unreasonable, resulting in less network average residual energy. DEBUC uses a time-based broadcast mechanism to select CH that reduces control overhead effectively. Multihop routing takes into account such factors as CH energy, distance, and node degree. The average residual energy of the network is more than that of EEUC. DUCISCA improves CH selection algorithm and competition radius calculation algorithm, which makes the distribution of clusters more reasonable. Moreover, in order to save and balance energy, DUCISCA adopts intercluster multihop routing based on ISCA strategy that reduces the energy consumption of data transmission effectively. Hence, the energy consumption of DUCISCA is less than other four protocols.Figure 7
Network average residual energy.


## 5.1. Simulation Parameters

To prove the performance of DUCISCA, the EEUC, DEBUC, I-EEUC, M-DEBUC, and DUCISCA are simulated under the same conditions using MATLAB 2018a, and many performances are compared. We run for 1000 rounds, and each node transmits a data packet each round. The network parameters are shown in Table2.Table 2
Network parameters.
ParametersValuesParametersValuesNetwork coverage(0,0)~(200,200)mRcomp060 mBase station location(100,250)mc1,c2,c30.4,0.3,0.3Node number400d1,d2,d30.4,0.3,0.3Initial energy0.5 Jw1,w20.5,0.5Date packet size4000 bitsδ3Date packet header100 bitsTCH30 sT0.4


## 5.2. Analysis of Simulation Results

### 5.2.1. CHs’ Energy Consumption

A comparative analysis of CHs’ energy consumption after 20 rounds of network clustering is made, as shown in Figure4. The average CHs’ energy consumption of I-EEUC, EEUC, DEBUC, M-DEBUC, and DUCISCA are 0.2077 J, 0.1156 J, 0.1021 J, 0.1030 J, and 0.0980 J, respectively. Obviously, CHs’ energy consumption of DUCISCA is lower than other protocols, and the energy consumption of each CH is balanced in each round. The energy consumption of CHs is related to the number of packets forwarded and the forwarding distance. DUCISCA optimizes the selection strategy of CHs and selects high-quality nodes as CHs, and the number of CHs does not change much. In addition, when establishing intercluster forwarding paths, ideal multihop paths are searched through ISCA, and data packets are forwarded accordingly; the energy consumption of intercluster communication is reduced.Figure 4
CHs’ energy consumption.


### 5.2.2. Network Lifetime

Network lifetime is one of the important indicators to evaluate network performance [33]. Table 3 shows the first node death (FDN) and half node death (HDN) times for the five algorithms in Figure 5. If HDN is used as the criterion of network lifetime, the five algorithms have 535, 633, 603, 637, and 668 network lifetimes, respectively. Compared with EEUC, I-EEUC optimizes the CH selection algorithm for more balanced energy consumption. Compared with I-EEUC, DEBUC not only optimizes the rules of CH selection but also takes into account the residual energy of nodes and energy consumption within clusters and energy consumption between clusters in multihop routing, which further balances the network energy consumption. Compared with DEBUC, M-DEBUC improves the competitive radius and waiting time of DEBUC, so it consumes less energy than DEBUC. Compared with M-DEBUC, the proposed DUCISCA considers factors such as node energy, distance to the BS, and node degree when CCHs compete for FCHs, which is more reasonable than M-DEBUC CH selection and the FDN time is later. It can be seen from Figure 5 that DUCISCA can better balance the energy consumption between clusters, so the later death speed is slightly faster than other algorithms.Table 3
Number of dead node rounds for 5 protocols.
Protocol nameRounds of FDNRounds of HDNEEUC356535DEBUC594633I-EEUC558603M-DEBUC596637DUCISCA655668Figure 5
Network lifetime.


### 5.2.3. Number of Packets Received by the BS

Figure6 is a comparison diagram of the number of packets received by the BS for the five protocols. Table 4 shows the final number of packets received by the BS for the five protocols. Based on this table, the number of packets received by the BS in DUCISCA is about 4.7 times that of EEUC, 3.4 times that of I-EEUC, 2.3 times that of DEBUC, and 1.2 times that of M-DEBUC. This is because the improved CH selection and multihop routing mode of DUCISCA extends the lifetime of network, especially the improved multihop routing, so that more CHs indirectly send data to the BS through multihop mode, which increases the amount of data received by the BS. Before the arrival of DUCISCA’s HDN, most nodes of the compared protocols have died, and there are coverage vulnerabilities in the monitoring area, so it is difficult for nodes to send data to the BS.Figure 6
Number of packets received by the BS.Table 4
Number of packets received by BS for 5 protocols.
Protocol nameNumber of packets received by BSEEUC3730DEBUC7549I-EEUC5075M-DEBUC14101DUCISCA17312


### 5.2.4. Network Average Residual Energy

Figure7 compares the variation of the network average residual energy for the five protocols with the number of running rounds. Because EEUC only considers energy in routing, the intercluster routing is unreasonable, resulting in less network average residual energy. DEBUC uses a time-based broadcast mechanism to select CH that reduces control overhead effectively. Multihop routing takes into account such factors as CH energy, distance, and node degree. The average residual energy of the network is more than that of EEUC. DUCISCA improves CH selection algorithm and competition radius calculation algorithm, which makes the distribution of clusters more reasonable. Moreover, in order to save and balance energy, DUCISCA adopts intercluster multihop routing based on ISCA strategy that reduces the energy consumption of data transmission effectively. Hence, the energy consumption of DUCISCA is less than other four protocols.Figure 7
Network average residual energy.


## 5.2.1. CHs’ Energy Consumption

A comparative analysis of CHs’ energy consumption after 20 rounds of network clustering is made, as shown in Figure4. The average CHs’ energy consumption of I-EEUC, EEUC, DEBUC, M-DEBUC, and DUCISCA are 0.2077 J, 0.1156 J, 0.1021 J, 0.1030 J, and 0.0980 J, respectively. Obviously, CHs’ energy consumption of DUCISCA is lower than other protocols, and the energy consumption of each CH is balanced in each round. The energy consumption of CHs is related to the number of packets forwarded and the forwarding distance. DUCISCA optimizes the selection strategy of CHs and selects high-quality nodes as CHs, and the number of CHs does not change much. In addition, when establishing intercluster forwarding paths, ideal multihop paths are searched through ISCA, and data packets are forwarded accordingly; the energy consumption of intercluster communication is reduced.Figure 4
CHs’ energy consumption.


## 5.2.2. Network Lifetime

Network lifetime is one of the important indicators to evaluate network performance [33]. Table 3 shows the first node death (FDN) and half node death (HDN) times for the five algorithms in Figure 5. If HDN is used as the criterion of network lifetime, the five algorithms have 535, 633, 603, 637, and 668 network lifetimes, respectively. Compared with EEUC, I-EEUC optimizes the CH selection algorithm for more balanced energy consumption. Compared with I-EEUC, DEBUC not only optimizes the rules of CH selection but also takes into account the residual energy of nodes and energy consumption within clusters and energy consumption between clusters in multihop routing, which further balances the network energy consumption. Compared with DEBUC, M-DEBUC improves the competitive radius and waiting time of DEBUC, so it consumes less energy than DEBUC. Compared with M-DEBUC, the proposed DUCISCA considers factors such as node energy, distance to the BS, and node degree when CCHs compete for FCHs, which is more reasonable than M-DEBUC CH selection and the FDN time is later. It can be seen from Figure 5 that DUCISCA can better balance the energy consumption between clusters, so the later death speed is slightly faster than other algorithms.Table 3
Number of dead node rounds for 5 protocols.
Protocol nameRounds of FDNRounds of HDNEEUC356535DEBUC594633I-EEUC558603M-DEBUC596637DUCISCA655668Figure 5
Network lifetime.


## 5.2.3. Number of Packets Received by the BS

Figure6 is a comparison diagram of the number of packets received by the BS for the five protocols. Table 4 shows the final number of packets received by the BS for the five protocols. Based on this table, the number of packets received by the BS in DUCISCA is about 4.7 times that of EEUC, 3.4 times that of I-EEUC, 2.3 times that of DEBUC, and 1.2 times that of M-DEBUC. This is because the improved CH selection and multihop routing mode of DUCISCA extends the lifetime of network, especially the improved multihop routing, so that more CHs indirectly send data to the BS through multihop mode, which increases the amount of data received by the BS. Before the arrival of DUCISCA’s HDN, most nodes of the compared protocols have died, and there are coverage vulnerabilities in the monitoring area, so it is difficult for nodes to send data to the BS.Figure 6
Number of packets received by the BS.Table 4
Number of packets received by BS for 5 protocols.
Protocol nameNumber of packets received by BSEEUC3730DEBUC7549I-EEUC5075M-DEBUC14101DUCISCA17312


## 5.2.4. Network Average Residual Energy

Figure7 compares the variation of the network average residual energy for the five protocols with the number of running rounds. Because EEUC only considers energy in routing, the intercluster routing is unreasonable, resulting in less network average residual energy. DEBUC uses a time-based broadcast mechanism to select CH that reduces control overhead effectively. Multihop routing takes into account such factors as CH energy, distance, and node degree. The average residual energy of the network is more than that of EEUC. DUCISCA improves CH selection algorithm and competition radius calculation algorithm, which makes the distribution of clusters more reasonable. Moreover, in order to save and balance energy, DUCISCA adopts intercluster multihop routing based on ISCA strategy that reduces the energy consumption of data transmission effectively. Hence, the energy consumption of DUCISCA is less than other four protocols.Figure 7
Network average residual energy.


## 6. Conclusions

The major contribution of this article is to propose a distributed unequal clustering routing protocol based on ISCA (DUCISCA) to enhance WSN performance in terms of energy efficiency and lifetime. In the CH competitive stage, this protocol improves the competitive radius which considers the residual energy of node and the distance to the BS. It can balance energy consumption of nodes in different locations to avoid the “hot spot” problem. This is a precondition for unequal clustering. At the same time, it adopts a time-based broadcast mechanism. The waiting time depends on the residual energy of CCHs, the distance to the BS, and the number of neighbour nodes, which can effectively reduce the overhead of nodes. After the cluster head selection is completed, it enters the cluster formation stage. In order to produce optimal clusters to balance network energy consumption, a rule for joining clusters is proposed, which takes into account the energy of CHs, the degree of nodes, and the distance between ordinary nodes and CHs. Finally, the standard deviation of cluster CHs’ residual energy in intercluster communication is taken as the objective function to search the energy-balanced intercluster data forwarding path based on ISCA. Compared with EEUC, DEBUC, I-EEUC, and M-DEBUC, DUCISCA has better effectiveness compared to above protocols in terms of nodes’ energy consumption, network lifetime, throughput, and network average residual energy.In future work, we will further optimize the DUCISCA protocol according to the experimental results to improve the energy saving effect of the protocol.



---

*Source: 7382098-2022-02-23.xml*