Reducing Energy Consumption of the SEECH Algorithm in Wireless Sensor Networks Using a Mobile Sink and Honey Bee Colony Algorithm

Purpose – Clustering, routing, and data dissemination are an important issue in wireless sensor networks. The basic functions of wireless sensor networks are phenomena controlling in the physical environment, and the reporting of sensed data to the central node called sink, in which more operations can be done on the data. The most important limitation of wireless sensor networks is energy consumption. There are several ways to increase the lifetime of these networks, that one of the most important is the using proper clustering method. The aim of this study is to reduce energy consumption using an effective clustering algorithm and for this purpose, the honeybee colony metaheuristic method was used for cluster heads selection. Methodology/approach/design – The simulation in this paper was done using MATLAB software and the proposed method is compared with the LEACH and SEED approach. Findings – The results of simulations in this research indicate that the research has significantly reduced the energy consumption in the network than LEACH and SEED algorithms. Originality/value – Given the energy constraints in the wireless sensor network, providing such solutions and using metaheuristic algorithms can dramatically reduce energy consumption and, consequently increase network lifetime.


Introduction
The sensor delivers a sense of the environment in the form of an electrical signal.This section may be a consisted of several types of sensors that can measure the changes in several different parameters of the environment [1].Wireless sensor networks are used to collect information in areas where the user cannot be there.In a sensor network, the sensors individually measure local values and send this information to other sensors if necessary, and ultimately send them to the base station.These networks are autonomous, and they are working without human intervention.To improve the network efficiency and reduce energy consumption simultaneously, clustering mechanisms with hierarchical structures is used for sensor networks [2].
One of the most important issues in such networks is high possibility of failure in nodes.These failures can be occurred because of various reasons, for example when sensor nodes run out of energy.So, energy is regarded as a crucial factor for network.One of the most considerable topics in these networks is energy maintenance to increase network lifetime.The most important issue in sensor networks is clustering and the most important issue in clustering is optimal energy consumption in sensors to increase network lifetime, because sensors have limited energy and are not rechargeable.These networks typically have static nodes or with limited mobility and a central node which collects sensed data from nodes directly (one-step method) or indirectly (multi-steps).In directly transmission, each sensor sends information directly to central node, because of distance between sensors and base station, a lot of energy consumed in each transmission.In contrast designs which make communication distance smaller could extend network lifetime.Clustering protocols are appropriate methods for extending WSNs lifetime.In clustering, network is divided to clusters, in each cluster a node will be selected as cluster head.Member clusters send processed data to cluster head (either directly or indirectly and by multi-steps method).After that data are aggregated and be sent to base station using one-step or multi-steps transmission [3][4].
Clustering is a cross-sectional technique that can be used on almost all Protocols stack layers.The basic idea is to gather the nodes around a cluster that is responsible for maintaining the status and communication within the cluster, in a group [5][6], [7].
LEACH (Low-Energy Adaptive Clustering Hierarchy) [8], [9] is an energy efficient adaptive commonly used clustering algorithm.The goal of the LEACH protocol is to reduce the energy consumption of the wireless sensor network through a cluster-based process.To achieve this goal, the LEACH protocol selects nodes as cluster headers dynamically and ultimately forms the clusters.The intracluster communications are single hop.After receiving the information, the cluster head will send the information to the main station or next cluster heads.LEACH [7], [10]modifies the cluster head alternately to a Uniform Distribution of Energy Consumption among the nodes.The LEACH performance is controlled by the run-time.The cluster head is selected at the beginning of each run.Each turn consists of two stages: preparation and maintenance.In the preparation stage, the cluster heads are selected, and the cluster is formed.Then, the timing of communication within the cluster is determined.In the second step, sending data to the cluster head performed based on the first stage timing, followed by sending data to the base station.The duration of the maintenance phase to reduce the overhead time is more than the preparation stage.At the beginning of each run, LEACH selects the cluster head randomly.Selection of the cluster was performed at the middle of the announcement stage, the time of the all-inclusive message sending of the cluster's announcement message.First, each node selects a random number between (0 and 1).If the random number is less than T (n), that node is selected as the cluster head.T (n) is calculated as follows [11]: P is the appropriate percentage of cluster heads, r is the current run and G is the set of unselected nodes in the last 1/p.The selected cluster is announced to neighbors as the new cluster head.According to [6], [10], the most important weaknesses of this algorithm include: -It cannot be used for the vast networks.
-It is not clear that how the predetermined number of the cluster-heads (p) can be distributed equally among the network.In fact there is no guarantee about the place or the number of the cluster-heads on each scenario.
-Creation of control over the number and the place of the cluster-heads and also on the sizes of the clusters with respect to the members, has always been considered as a challenge and solving this issue requires some effective clustering algorithms in energy-consumption and therefore it balances the network's load.
SEECH(Scalable Energy Efficient Clustering Hierarchy) protocol [11]: SEECH protocol works after the distribution of nodes in the network environment.This protocol first starts performing the startup phase.In this phase, each node calculates some of the necessary information about its status, such as distance to sink and the number of neighbors ni in a particular radius of the RNG.Obtained information is shared with other nodes.At the end of this phase, each node acquires its degree: Calculated data are used in the next round.In each round, the protocol runs two successive phases, called Startup and static state.The network graph is determined during the startup phase.In other words, the clusters, cluster heads and amplifier sensor node, as well as the path between each cluster and data sink, are determined.In the static state phase, the network data is collected from the nodes and sent to the sink according to the Contractual topology in each round.As with many clustering protocols, nodes with a high energy level are selected for cluster heads and change in time.In addition, other high energy nodes are selected as amplifier sensor nodes.Figure 1 shows an overview of node categorization in the SEECH protocol [11].[11] In the SEECH protocol, the number of neighbors in a restricted radius of ni, which determines which sensor nodes are appropriate for the cluster header.Generally, nodes with higher degrees are more suitable for selection as cluster headers.The advantage of this method is that the high number of nodes may be covered by the small number of clusters with less costly communications.In a network with non-uniform node distribution, node degree may be generalized to other criteria (such as distance to the neighbors).The cluster selection process is as follows.First, some of the nodes are selected temporarily as a cluster head using the distributive method.Then, some of these nodes introduce themselves to the network.These nodes are known as cluster candidates.The rest of the nodes are in sleep mode.After that, all candidates run a simple algorithm to select the final cluster head.In the SEECH protocol, each node i, computed p c i to determine its chances of being candidates [11].

SEDIGHIMANESH, M; SEDIGHIMANESH, A. Reducing Energy Consumption of the SEECH
In this equation, Eresi shows the remaining energy of the i node, protect low-energy nodes.In the first round, the primary energy of the node is replaced with the residual energy.In addition, λ (which is a number between (0 and 1) and usually considered 0.9) does not have a chance for low-energy nodes, and pc-tot is [6], [10], [12]: (KCHC) in the above equation ensure that for most rounds, the number of temporary sample clusters is lower than the number of required candidates.In the above equation, Eav is the average energy of the remaining nodes in the current round, that calculated by the cluster heads in the previous round and during the formation of the cluster.In each round, the energy of the remaining nodes is small, while their degrees may be completely different.As a result, the priority of the nodes by Equation ( 4) has a deeper dependence on the node degrees instead of their residual energy.When Pci is calculated, each node generates a random number between (0 and 1) and comparing it with Pci.If the generated number is less than Pci, then it considers its node as the cluster head.
In the same way, all cluster head candidates will inform the rest of the candidates by echoing a CH-CANDIDATE-MSG message using the CSMA protocol without any special order.The nodes that received the message store it and estimate their distance to the equivalent node.Before announcing a candidate, each node counts the number of candidates, and if it is equal to the KCHC, it will not announce itself as a candidate to the network and will lose the competition.Each CH-CANDIDATE-MSG message contains the sender's identifier, the transmitter's residual energy, the intervals smaller than the RNG to all previous candidates in the current round and the equivalent identifier.Then, each candidate will execute the algorithm separately to determine whether it is the final cluster.The candidates and cluster sets are specified by RCHC and RCH, and KCH is the number of clusters needed.
According to [6], [10], the most important weaknesses of this algorithm include: -It cannot be used for the vast networks.
-Electing KCH and RCH isn't suitable all of the environments such as heterogeneous environments.

Proposed method
In this paper, our proposed method is examined in two homogeneous (the energy of all sensors is initially the same) and heterogeneous (the energy of all sensors is not initially the same) environments.In our proposed approach, we first consider 10% of the environment as a gateway, in which all the bottom layer cluster heads send their information to the gateway layer, and gateways layer sensors will send data to the base station, as well as at the clustering time the Honeybee colony metaheuristic algorithm is used to select cluster heads.We first outline the energy consumption model in wireless sensor networks and then describe the proposed method.

Energy consumption model
The energy consumption in a wireless sensor network includes three parts: data transmission, data reception, and data processing.The energy model is given in relation ( 5) [6], [10], [12].
PT, PR and Pcpu respectively represent the energy consumption of sending, receiving, and processing k bits data.E elec .E amp and E cpu represent the energy consumption (nJ / bit) for sending each bit in radius, the energy required to send with a radius greater than Eelec and the energy needed to process per bits.According to Equation (5), the total energy of the k bit is given by (6) [13].
Given the above relationships, the energy consumption is directly related to the length of the data.If the length of the data sent is small, we will consume less energy.If the transition distance is lower than the threshold, the energy consumption will be related to d 2 .If the transition distance is greater than the threshold, it will be related to d 4 .Therefore, the shorter the transition distance, the energy consumption can be reduced.

Description of the proposed method
In general, our proposed method works as follows.Nodes initially distributed on the ground or randomly.

SEDIGHIMANESH, M; SEDIGHIMANESH, A. Reducing Energy Consumption of the SEECH
 is the coefficient that specifies the energy threshold.Namely, nodes whose energy are greater than the average  can participate in the process of choosing a gateway or cluster node.Specifies the probability of selecting a gateway node.Each node generates a random number between zero and one.If the generated number is less than its Pr i , then that node is known as a temporary relay node.Then we obtain the distance of all the relay nodes with the sink.Distances are arranged to ascend.20% of these nodes that are closer to the sink is selected as the final relay node.
 in the algorithm.KCHC Specifies the number of final cluster heads.Psi is determining the probability of the temporary clustered.The Pci value is then calculated for each node.The nodes are arranged based on their Pci in descending order.The  percentage of these nodes that have greater Pci, are selected.The honeybee colony algorithm is used to select cluster heads from these nodes.The number of clusters is 10% of the total number of the live nodes, and the number of optimization variables of the bee colony algorithm is equal to the number of clusters.A bee population is generated randomly.The cost of each bee is composed of two parts.The first cost is equal to the amount of energy consumption of the bee.This includes the cost of connecting the normal nodes to the cluster heads, connecting the cluster heads to the relay nodes, and the relay nodes to the sink.The second cost is the inverse of the total energy of the nodes of each bee, that given the cost of the nodes with less energy, is not suitable for being cluster head, thus avoiding the rapid death of nodes.The final cost is equal to the product of these two costs.By doing this, cluster heads are selected that both have more energy and also optimize energy consumption in the network.Then, for each bee, a bee is randomly selected among other bees.This bee randomly moves to the selected bee, then the new bee cost is calculated.If the new bee position was better than the previous bee, the new bee would replace.The roulette wheel method is then used for selecting a bee: the cost of each bee is divided by the total cost of the bees, after which the cumulative distribution of these bees is calculated, and a random value is created between zero and one, if this random value is less than the cumulative distribution of each bee, that bee was chosen.In the next step, an observer bee replaces the previous one.Among other bees, a bee is randomly selected, then the observer bee moves toward this selected bee.The new observer bee cost is calculated, if the cost of the new bees is lower than the cost of the previous that was obtained with the roulette wheel in the previous step, the new bee replaces the previous one.Now, if each bee does not progress after several repetitions, one bee will randomly replace it.the best bee is chosen as the best solution.The position of the selected bee includes the number of nodes that should be cluster head.Each normal node in the network will be a member of the closest cluster head.If there were no cluster head, nodes sent the information directly to the sink.Then the cluster heads will send the information to the relay.Finally, after transmitting information to the relay nodes by the cluster head, the relay nodes have the task of transmitting the data to the sink.

Simulation and analysis of results
In this section, we provide the simulation results of the proposed method, analyzing, and comparing the results with the previous clustering protocols.The simulation was performed using MATLAB software.The initial parameters of a sensor network for simulating 100 nodes are given in Table (1).

Notation Description
Area=100*100 Area used in the simulation in metes E0=0. 5 General assumptions considered in the simulations: -Sensors are distributed randomly uniformly.
-The sensors are fixed.
-Sensors are aware of their location.
-The initial energy of the sensor is clear.
-The ID of each sensor is unique.

Simulation and analysis of the results in a homogeneous network
In the Charts, the network lifetime, the number of live nodes during the simulation in the proposed method are compared with the LEACH and SEECH protocols, taking into account the assumptions of Table (1).As we can see from the chart and tables, our proposed method is about 75% better than LEACH protocols and 50% better than SEECH and it increases the network lifetime.

Simulation and analysis of results in a heterogeneous network
All sensors are not the same and do not have the same initial energy, 50% of the sensors have twice as much power as the other sensors.In charts.1-2, the lifetime of the network and the number of live nodes during the simulation in the proposed method are compared with the LEACH and SEECH protocols, taking into account the assumptions of Table (1).As we can see from the charts and tables, our proposed method is about 90% better than LEACH protocols and 60% better than SEECH and improving the network lifetime.

Conclusion and suggestions
Undoubtedly, one of the most important challenges of wireless sensor networks is the energy resource limitation.Small size, low weight, and positioning of sensors, which are necessary for specific applications of wireless sensor networks, causes the sensor nodes are still dependent on small batteries to supply their energy.Additionally, the performance of wireless sensor networks is dependent on the lifetime and their network coverage.One of the most important issues regarding these networks is clustering.In this paper, the clustering problem in wireless sensor networks with the aim of reducing energy consumption and maintaining network coverage has been addressed.To achieve this goal, we proposed an appropriate algorithm to reduce energy consumption and improve the efficiency of the SEECH algorithm and the honeybee algorithm in the wireless sensor networks.The results of the simulation of the proposed algorithm using the parameters in Table (1) indicate that our proposed algorithm significantly increased the network lifetime in homogeneous and heterogeneous environments than the LEACH and SEECH algorithms.As the future research that can be done to develop the protocols presented in the study, the following suggestions are made: -Combining the proposed algorithm with other routing protocols -Using a different structure for environment layering that takes into account the environment, considered initial layers, either large or small.

Figure 2 .
Figure 2. Sensors uniformly random positioning in the environment Then the sink is placed outside the environment and move in clockwise with a speed of 10 per round.

Figure 3 .
Figure 3. Positioning The Sink out of The Network Environment

Figure 7 .
Figure 7. How to transfer cluster data to relay nodes

Figure 8 .
Figure 8. Transmission of data from relay nodes to the base station

Chart 1 . 2 .
Comparison of lifetime of the proposed method with LEACH and SEECH protocolsChart Comparison of the number of live sensors in the proposed method with the LEACH and SEECH , M; SEDIGHIMANESH, A. Reducing Energy Consumption of the SEECH Algorithm in Wireless Sensor Networks Using a Mobile Sink and Honey Bee Colony Algorithm.The Law, State and Telecommunications Review, Brasilia, v. 10, n. 1, p. 185-200, May 2018.[DOI: https://doi.org/10.26512/lstr.v10i1.21506]

Table 2 .
(1)e, we present the death of nodes table in three different states, the death of the first node, the death of 50% of the nodes and the death of 80% of the nodes, taking into account the assumptions of Table(1).Comparison of the Death of proposed method nodes with LEACH and SEECH Protocols SEDIGHIMANESH, M; SEDIGHIMANESH, A. Reducing Energy Consumption of the SEECH Algorithm in Wireless Sensor Networks Using a Mobile Sink and Honey Bee Colony Algorithm.The Law, State and Telecommunications Review, Brasilia, v. 10, n. 1, p. 185-200, May 2018.[DOI: https://doi.org/10.26512/lstr.v10i1.21506]

Chart 3 .
(1)parison of the proposed method lifetime with LEACH and SEECH protocols Comparison of the number of live sensors in the proposed method with the LEACH and SEECH protocols Here, we present the death of nodes table in three different states, the death of the first node, the death of 50% of the nodes and the death of 80% of the nodes, taking into account the assumptions of Table(1).

Table 3 .
Comparison of the Death of proposed method nodes with the LEACH and SEECH Protocols