An efficient hybrid model for cluster head selection to optimize wireless sensor network using simulated annealing algorithm

Objective: Energy efficiency aspect in wireless sensor networks (WSN) can be achieved by small sized rechargeable and easily replaceable batteries. The lifetime of wireless sensor network can be improved by identifying the efficient and reliable nodes as a cluster heads using Hybrid Simulated Annealing algorithm. The proposed algorithm identifies cluster head to reduce overhead and is capable of handling high volume of nodes with minimum node death rate. Methods: This study proposed initialization of population vectors using the opposite point procedure, self-adaptive control approach by node mutation rate, crossover rate, node capacity and cluster head allocation Methods. Findings: A case study in the proposed work is found to be better in throughput, accuracy, efficiency, energy utilization, batteries recharge ability and replacement procedures compared to the conventional methods. By the analysis and comparison of the proposed method with existing methods, it is identified that the reduction of the number of dead nodes gradually increases the throughput and lifetime of the nodes with respect to the number of iterations. Novelty: To overcome the limitations of conventional Low Energy Adaptive Clustering Hierarchy (LEACH), harmony search algorithm (HSA), modified HSA and differential evolution, we propose a hybrid optimal model using simulated annealing algorithm which includes a node capability function. It is used to improve the network lifetime of the cluster heads and sensor nodes. The proposed method have capability of batteries recharge ability and replacement option to improve network throughput and reliability of network.


Introduction
The wireless sensor network is a symbol of the fourth generation of sensor network. It is a distributed self-organizing network and combines the acquisition of data, processing and communication functions together. There is a wide range of applications for these wireless sensor networks which include agriculture, military, transportation etc. A limited number of batteries power these nodes with to extend the lifetime and hence reduces the energy consumption. Division of a reasonable clustering routing protocol into three main groups, namely, cluster setup phase, cluster head election phase and data transmission phase proved to be an effective method to reduce the energy consumption in wireless sensor networks. The sensor node groups, in the cluster setup phase, forms clusters of various sizes in the detection area. Depending on an electoral mechanism, few nodes are selected as cluster heads and the remaining behave as member nodes in the cluster head election phase. In the data transmission phase, it is the responsibility of the member nodes to collect in environmental information and transmit it to the cluster heads. Following the aggregation and data fusion the cluster heads forward this data to the base station. The base station transmits this data to the control center through satellite, internet or a mobile network. The center personal will take decisive actions based on the current environmental information. Figure 1 shows a typical wireless sensor network logical hierarchy diagram. In modern years, different countries researchers have projected a range of clustering protocols for WSNs. There are numerous classical protocols, such as LEACH (Low-Energy Adaptive Cluster Hierarchical) (1,2) , SEP (Stable Election Protocol) (3) , DEEC (Distributed Energy-Efficient Clustering) (4) & HEED (Hybrid Energy Efficient Distribution) (5) . A novel group-based, clusterbased hierarchical division scheme which lessens the number of hops in a cluster is projected in (6) & a hybrid clustering method combining static & dynamic clustering is projected in (7) . M. Karpagam (8) propose Multi-objective evolutionary algorithms (MOEAs) to obtain the optimal network arrangement. A Chain Based Cluster Co-operative Protocol (CBCCP) is projected in (9) and Markov model is taken into account in (10) . Monjul Saikia (11) recommend a new network structure model, compared to the original energy consumption model (12) , the formula for finding the optimal cluster number in the area is proposed in a given WSN.
https://www.indjst.org/ WSN is a network of two or more sensors nodes that operates at remote places to sense the data that are application specific, like some sensors sense the data related to the atmosphere to forecast the weather, some sensors are intended to sense the vibration of the bridges to forecast its durability and so on. The sensors are outfitted with the minute batteries to supply energy to sense, process & transmit the information to other nodes or the base station using wireless connectivity, nodes consume more energy to communicate depending on the location of the Cluster head (CH) or the Base Station (BS) rather than sensing & processing data. Once every sensor nodes inside network are out of power then entire network dies resulting in the network failure, hence it is much-needed to optimize the energy consumption of the node (13) . Optimization can be achieved by finding the rules or procedure that reduces the number of node's death (14) . Optimization can be achieved either by self-recovering from the failure that is heuristic or the higher-level heuristic procedure known as metaheuristic. Heuristic approach considers the particulars of one problem at a time providing the solution that has a local scope and fails to provide the global optimum solutions. On the other end, metaheuristic approach considers particulars of entire problem at a given point of time to provide the global solution to optimize the network lifetime (15) .
A number of methods of topology control have been proposed for WSNs. However, clustering has been confirmed to be the most proficient and extensively used system for overseeing structure of a given network. Furthermore, cluster-based routing mechanisms have been showcased in the (16) . These mechanisms include two phases: The set-up phase and the steady state phase. In the set-up phase, all sensor nodes are structured in the form of clusters. In every cluster, a Cluster head (CH) selection algorithm is executed to choose a node as the leader of the corresponding cluster and carry out associated tasks. Hence, every cluster has member nodes and a CH. Subsequent to the CH selection, the steady-state phase starts and the CH aggregates the data received from adjoining member nodes and transmits it to the BS directly (single-hop communication) or through other CH nodes (multi-hop communication) as demonstrated in Figure 2. On the other hand, multi-hop communication within a cluster can lessen the number of communication links and evade the communication congestion compared to direct communication. This is due to the fact that the CH has to communicate with extra member nodes simultaneously. Additionally, multi-hop communication can allow member nodes to help the CH in sharing the task of data aggregation and reduce the energy consumption of CHs. This leads to the improved lifetime of the underlying network. The recompenses of heuristic approach is that it always tries to provide the acceptable solutions to the given problem by using trial and error approach in a small duration whereas the metaheuristic approach like Genetic algorithm, Differential Evolution (DE), Simulation Annealing (SA) (17) are generalized and black box procedures that can be used in various areas, it always tries to provide solution that might not be the best but optimal solution for a given problem (18) . The approach used in (19) tries to use DE together with optimization of particle swarm for the purpose of node localization. The approach specified in (8) uses fuzzy to select the cluster head providing intermediate solution rather than the optimal solution as it requires entire network information, hence this approach does not suit in the environment where the nodes are deployed randomly. The cluster heads in WSN are selected using metaheuristic approach, as these approaches support next generation algorithms in selecting a better set of population providing a better offspring by making use of fitness functions (20) .
In this study, an algorithm based on DE and SA to optimize the lifetime of wireless sensor network is proposed. On the other hand, a lot of work that focus on selecting the cluster head based on distance from base station and residual energy is been carried out in the field of WSN (21) .
The in-advance demise of the heads of cluster is due to overload caused by inappropriate assignments of sensor nodes to the heads of cluster during formation of the cluster which in due course increases the latency thereby reducing the performance (22) .
As the main aim of this study is to optimize the network lifetime by using DE and SA approach, this Hybrid approach has shown that it can perform better to other approaches such as LEACH, HAS, MHSA in maximizing the lifetime of the wireless sensor network by selecting cluster head optimally.

The homogeneous sensor networks
A sensor network which is called homogeneous comprises a main station called Base Station and also there are sensor nodes in this network which are capable of the similar kind of competencies, i.e., in other words, their power of computing & capability of the memory will be same. The data gathering process in such type of networks is dependent on the propagation structure of data. There are couple of topologies namely hierarchical and flat which are very familiar structures that are largely premeditated for propagation & gathering of data in networks which is homogeneous in nature. Within a network which is hierarchical in nature, there is a prearrangement of the sensor nodes inside the given clusters, in a way that the heads of the cluster will be serving as straightforward relays for the communication of data. Since the heads of the cluster will be having the identical communication ability as that of the available sensor nodes, the least amount (or min number) of required clusters is got from the throughput's upper limit. Nevertheless, the superior throughput that can be obtained with the help of clustering enforces the price of additional nodes that work as Heads of the clusters. The collection of data in a hierarchical network includes merging data of all the CHs which would actually lessens the amount of messages that is been transmitted to the BS. In Conclusion, we can say that the efficiency of network is amplified in terms of the consumption of the power or in other words energy.

The heterogeneous sensor networks
Within the network, that is heterogeneous in nature, the movable base stations are positioned in the locale of network & they haphazardly keep shifting here and there, and gather the data unswervingly from all the ordinary sensor nodes that are available, or they would make use some of the other sensor nodes to rerun data. It is possible that the sensors could have been disseminated as a dotted approach while the detachment among given couple of sensor nodes could possibly be elongated. The Longer distance among the given sensor nodes implies that there will be more energy that will be frenzied for the communication of data. Also, parallelly the sensor nodes should be capable of sensing the data and then communicating the data with the neighbouring sensors for an elongated amount of time. Most of the pragmatic results demonstrate that the collection of data with moving destinations can actually extend the lifetime of the given network. Figure 3 shows the fundamental structure of fundamental structure of Heterogeneous and Homogeneous in WSN.
This study is structured in the following manner, II section depicts the job conducted associated to description of the problem. III section describes the system model of WSN. IV section describes the proposed hybrid SAA approach to optimize the network lifetime of WSN. In V section, simulated results are discussed and at the last, section VI would have the work conclusion.

Related work
Today, there exists a huge number of clustering algorithms (23) among which the widely known and used algorithm in Wireless Sensor Network is LEACH. It forms the cluster of sensor nodes depending on the established strength of the signal & uses the random probabilistic distribution to reduce the dissipation of energy (24) . The LEACH consists of two phases, in the set-up phase the head of cluster is selected on round basis followed by steady-state phase that includes information transmission.
The cluster head in LEACH is elected with a probability 'p ch ' that means, consider a group of sensor nodes that are eligible to become a cluster head and is denoted as 'S ch ' , Let 't' be the iteration and 'p ch ' be the probability that each eligible node become the cluster head. A range of random numbers between 0 and 1 is selected for each eligible node, if the selected number falls below the threshold T h then that node be elected as the head of cluster as shown in equation (1).
The other two protocols in WSN that are based on evolutionary approach are Particle Swarm Optimization (PSO) and Ant Colony Optimization (ACO) (25,26) . These two protocols presume that the nodes are scattered equally inside WSN, select cluster heads in WSN, based on modest approach and ask the non-cluster head nodes to join the close by Cluster heads to form the cluster. The drawback of this approach is that it creates overload to Cluster heads where huge number of sensors are deployed near to it. The authors in the study (27,28) , have used PSO technique for clustering and communication in the wireless sensor network and it is also been highlighted that the PSO efficiently optimizes the network lifetime of WSN, however the study in (29) shows that PSO technique suffers from a problem called curse of dimensionality. The study in (30) has showed that the Differential Evolution (DE) techniques proves to be the best for clustering among all other conventional methods in WSN (31) , it also states that DE technique is simple, consisting of fewer parameters, reliable and provides the optimum solutions in each run.
In the study (32,33) the author has showed that the DE is best suited for all the newly emerging problems that are related to optimization. In the study (34,35) it was highlighted that the HAS and MHSA suffers from problem of fixed pitch adjustment rate that causes uncertainty resulting in local optimum value and random search directions slows down the convergence towards https://www.indjst.org/ optimum value. The limitations of HAS and MHAS can be overcome using DE by increasing the local search capacity using population multiplicity (36,37) . However, DE supports the decision variables based on the real numbers and the convergence in DE is not stable and locks itself into local optimum solutions thereby by not guaranteeing the optimum solutions. The study in (38,39) states that the simulated annealing makes use of probabilistic jump avoiding the process of search in local minimum during local optimal solution. The optimization process using SA requires longer duration resulting in reduced convergence speed. In addition to it, SA does not guarantee the optimal solution in all the run, that means SA gives many solutions and few among these solutions are not optimal one.

Differential evolution
Differential evolution algorithm is based on metaheuristic approach (38) . DE algorithm is simple and flexible enough to optimize the solutions of various multimodal search spaces. In addition to these, the algorithm is robust that targets to obtain global optimization. Both DE algorithm and Genetic algorithm are based on the evolutionary approach. The difference is that unlike genetic algorithm in which crossover operation is followed by mutation operation which is used occasionally, DE makes use of mutation operation to produces a better offspring in each generation comes first followed by the crossover operation. Binary representations is used by genetic algorithm on the other hand real numbers are used by differential evolution (39,40) . Figure 4 shows the DE flowchart and includes below points.
• For a specific generation 'Gen' , the populace vector 'i' is initialized by means of the set of random value with n as the upper limit value of populace and is given in Equation 2.
• The target vectors are used to produce a donor vector in the process of Mutation is given in equation 3.
• In DE, crossover operation follows the mutation phase during which it generates the trail vectors which is known as crossover rate (Cr) which is then compared with the random number set in the [0,1]. If the crossover rate (Cr) founds to be smaller than the random number then donor vector is used otherwise the similar vector is chosen as given in equation 4.
• Next generation vectors are selected among the trail or target vector in the selection phase as given in equation 5.

Simulated annealing (SA)
SA is based on metaheuristic algorithm and is suitable for materials because it does not rule out even the worse solution. This property of SA is very important that the solutions that are produced during the first iteration might not be the worst (41) . The solution is not rejected even if it does not meet the criterion but it is rejected with the probability as shown in equation 6 and equation 7.
https://www.indjst.org/ The equation (9) represents the energy change in equation (8) as follows: Where the Boltzmann's constant inverse is selected as ′ γ ′ and change in the capable function is denoted like △ C. On replacing change in power in Equation (8), the resulting likelihood is given as below: Where the energy level change is denoted as △E L , Boltzmann constant is represented as K B , temperature which is the fitness functions average value is denoted as ′ T ′ and Boltzmann's constant inverse is selected as ′ γ ′ . The exponential value of the temperature and the fitness function difference is used to express the probability.

System model
The model of radio dissipation includes two sections the transmitter and receiver that are set apart by a distance, d. The transmission section includes the amplifier for transmission and to transmit electronics and receiving electronics are part of receiving section that transmits the information in the form of bits. Let us assume that the rectangular filed consists of sensor nodes (42) . The nodes require E T X amount of energy to transmit and E RX amount of energy to receive K information over a distance of d and are given in equation (9) and (10) as follows: The energy consumed to transmit data of one bit is denoted as 'E c '; The coefficient of amplification in the free space from the transmission amplifier is given by 'ε AF ' and amplifier coefficient considering multi path is given by 'ε Amp ' .
The following observations about the network are noted.
• In the network, it is considered that the nature of the nodes is quasi-stationary.
• The consumption of energy by the sensor nodes depends on their distance to either the base station or the cluster head and is not the same for all the nodes. • Network nodes are not aware of their own location. • Every network nodes are of same kind. • The network nodes organize themselves and require no monitoring once they are deployed. • The power levels in every node are fixed. • The next step involves mutation followed by crossover and then SA algorithm is used in selection process to select next Gen vectors.
In this work, it is assumed that the value of threshold is set to 0.5. The population vectors are initialized using opposite point method. That means, the initial set of population vectors is used to generate another set vector in order to optimize the value and this process is known as opposite point method. The 'n' fittest individual in the given set are selected for the following generation. The random number from [0, 1] is initially selected for the mutation process.
https://www.indjst.org/ The literature section of the reference (43) uses the notation DE/x/y, where 'x' is a randomly selected mutation vector, the number of variances used in the mutation phase is represented by 'y' and the crossover scheme accepts binomial or exponential value and is represented using 'z' . In the proposed work, the operation DE/random/1 is performed if the selected random number exceeds the given threshold value else DE/current-to-best/1 is performed. The crossover phase makes use of blending rate that is generated using Gaussian distribution and the value for the 'z' factor is computed using equation (14). The selection phase makes use of simulated annealing algorithm to select the best next generation offspring. The populace size, amplification factor & finally the crossover rate are three important parameters on which differential evolution algorithm is based, both the crossover rate & amplification factor are self-adapted. The flowchart in the Figure 4. Illustrates the hybrid algorithm and the following sections explain working of each step in the algorithm.

Initialization of populace vectors by means of the opposite point technique
Instead of selecting the population randomly, a technique called as opposite point method is used to select population for the problems that requires global optimization. The aim of this phase would discover the paramount set of populace using opposite point method before and after each round of the evaluation to discover the position nearer to the worldwide optimum value (44) .
The phase includes below steps: • The population is initialized randomly accordingly to the size population.
• The opposite point method is used to compute opposite population.
• The union of both randomly selected population and the population generated using opposite point method is computed.
• The fittest individual of size n is chosen from the union and the procedure is repeated after selecting the next round offspring. • The operations of DE algorithm such as mutation, crossover & selection are used to obtain the next generation.
• The opposite populace is retrieved. • In the process the fittest individuals for size n are selected. • The next generation is incremented.

Self-adaptive control parameters
The population size, crossover rate and the amplification factor are parameters of the Differential Evolution that controls the optimum solutions. The amplification factor represented by (AF), the crossover rate is represented by (CO r ) changes for each individual in each round of computation and hence they are made as self-adaptive to obtain a best result (18) as given in equation 11 and equation 12.
The uniform random values are given by random j , where j ∈ {1, 2, 3, 4} and the adjustable factor (Ad) & crossover rate (CO r ) are adjusted using the probabilities τ 1 and τ 2 respectively. The value of 0.9 is selected as Upper bound ( f u ) and 0.1 is selected has the lower bound ( f l ). The amplification factor is adjusted using the probabilities τ 1 and τ 2 whose value is selected as 0. For the new vector a i,G+1 , the amplification factor has an influence on other operations of DE such as mutation, crossover, and selection operations.

Mutation
The threshold value is chosen as 0.5. The number is randomly selected in a range of [0, 1] and is compared with the given threshold value, the operation DE/rand/1 is performed if the selected random number exceeds the given threshold value otherwise DE/current-to-best/1 is executed, as given equation 13.

Crossover
Similar to DE algorithm, with the probability of 'CO r ' complete small portion of mutant vector is kept, the rest of the features are indirectly inherited from the parent vector using mix ratio defined by the blending rate (B r ) (44) . For the next generation, the vector c j,i,Gen is considered to be m j,i,Gen , in case the blending rate value B r is considered to be 0 as given in equation 14.

Selection
The selection process makes use of the SA algorithm as given in equation 15, the idea behind this is that at the end of each round the worst solution is not directly rejected but it is rejected based on the probability given by equation 16. The probability is computed as the exponential form and is given by the disparity of fitness function to its middling value in every round. Based on the solution of the fitness function, either the value of 'a' or 'u' is selected for the subsequent generation (45) , that means if the solution of the fitness function is higher than the original solution then u is selected else the value of 'a' is selected using probability.

Capability function
The fitness function considers nodes energy and distance as an important parameter as shown in equation 17, 18 and 19 and flowchart shown in Figure 5. The main goal of the fitness function is to obtain the most excellent next generation populace vectors set (46) .
Where 'ε' is the constant that is defined by the user to find each function contributions, the ratio of present node's energy to the cluster nodes energy is given by 'l 1 ' , the distance between the node 'x' and the cluster nodes is defined by Euclidean distance and given by 'l 2 ' and the distance beginning node 'x' to node 'y' is given by d(x, y) and the total amount of nodes in the cluster is specified by 'z' . https://www.indjst.org/

Cluster head allocation procedure
The following procedure explains how the sensor nodes be attached to the heads of cluster after electing the group of heads of cluster & the nodes in the WSN.
• The C head (S j ) represents a set of cluster head that are found by group of nodes that are within 20m.
• The C head (S j ) index number is then taken into account.
• The random number in the range of [0, 1] is selected as population a j,Gen .
• The product of (a j,Gen * C head (S j )) is calculated and the ceil of the product is considered.
• The ceil value is used to assign the sensor nodes to the cluster head. If the value of the ceil is 2 then new C head (S j ) is chosen. The Table 1 shows how the cluster head is selected using the above said approach.
https://www.indjst.org/  Figure 6 shows the flowchart of cluster head. The functions of different blocks in the block diagram has been listed below: • A new election message gets broadcasted within the cluster when the current cluster head's batter power level becomes less than a threshold value after serving a predetermined duration. • After voting of the cluster members, the cluster head decides the winner based on majority. The node with second highest number of votes becomes vice cluster head. This node takes the function of cluster head in case the elected cluster head fails before handing over its task to the successor. • The latest victor & the subordinate C-H have to exceed a confront reply from the contemporary C-H prior to the circumstance wherein they are endorsed to obtain office. • In case single or two of them be unsuccessful, the current C-H notifies the cluster members & begin a fresh selection.
• On the other hand if they succeed the C-H multicasts the Victor & runner-up to all the cluster members.

Results of simulation & discussion
The simulation to evaluate the performance of the network using the proposed approach along with various algorithms like DE, HAS, MHSA and LEACH is done using Matlab 2019a simulator. During the simulation process all the important parameters that are defined in the reference (46,47) which affects the network performance are considered and documented in Table 2. In addition to the parameters that are defined in the reference (48,49) the parameters such as consumption of energy by nodes, total number of dead and alive nodes & throughput are examined and plotted alongside the number of nodes.  Figure 7 depicts how the nodes be randomly positioned in the WSN. The nodes are then configured into clusters. The results can be found by performing 1000 runs on each seed and then averaging the results of run from 15 seeds. The Figure 8. Shows variation in the number of dead nodes due to change in the number of iteration. The network performs better if there is a minimal dead node. Table 3 shows the simulation analysis of dead nodes of the proposed algorithm and various conventional algorithms like LEACH, HAS, Differential evolution & Modified HSA. On the other hand, if the cluster head dies then the entire cluster fails resulting in the degradation of the network performance.  The Figure 9 shows the total number of alive nodes which increases when the amount of nodes in the network is varied. We can observe that following the approach discussed in 4.7 to assign the nodes to the cluster heads the likelihood of premature demise of sensor nodes are reduced and consumes less energy compared to LEACH, HAS, MHSA and DE algorithms thereby increasing the network lifetime resulting in the optimization of network performance. The consumption of energy by the sensor node is very important consideration in wireless sensor network because the sensor nodes are equipped by small batteries with limited energy. Table 4 shows the simulation analysis of alive nodes of the proposed algorithm and various conventional algorithms like LEACH, HAS, Differential evolution & Modified HSA. The nodes in the proposed hybrid SAA approach found to be alive for longer time increasing the performance of the network and from the simulation result it can be observed that the proposed approach increases the network performance by 73% compared to LEACH, 52% compared to HAS, 43% by modified HAS and by 63% compared to differential evolution respectively. The Figure 10 shows the residual energy of a WSN when the number of rounds are varied. The curve in the figure shows that there is a gradual increase in the residual energy due to nodes death using Hybrid SAA approach. This is because of the fitness function which is a result of the distance and the residual energy.
https://www.indjst.org/  Table 5 shows the simulation analysis of residual energy of the proposed algorithm and various conventional algorithms like LEACH, HAS, Differential evolution & Modified HSA. The Figure 11. Shows how the proposed approach out performs other approach such as LEACH, HAS, MHSA and DE algorithms in terms of throughput. It can be seen that the throughput is increased due to the number of alive nodes and more quantity of data is transferred in each round. The experiments are conducted by varying number of rounds and found that high throughput is achieved.

Conclusion
In this study, an efficient hybrid model for cluster head selection in order to optimize wireless sensor network using simulated annealing algorithm has been proposed. It is used to improve lifetime of wireless sensor network by reducing dead nodes with respect to number of iterations. The proposed algorithm optimizes the energy consumption by adopting battery replacement and recharging capability. With respect to simulation and performance analysis, results have shown that the network lifetime with Hybrid SAA approach has been increased by 45% as compared to modified HSA algorithm, while dead node reduces by 73%, 52 %, 43%, and 63% as compared to LEACH, HSA, MHSA and DE respectively.