A Novel Relay Node Placement and Energy Efficient Routing Method for Heterogeneous Wireless Sensor Networks

In heterogeneous wireless sensor networks (HWSN), sensor nodes may fail due to running out of battery power or sudden damage. This causes HWSN being partitioned to a number of separate networks. Relay node placement is to add new relay nodes to partitioned HWSN such that the network recovers to wireless communication. Energy efficient routing in HWSN is useful for prolonging network lifetime and energy conservation. This paper attempts to solve relay node placement and energy efficient routing problems for HWSN. Both problems have seldom been studied together in the literature. This paper first constructs a mathematical model for both problems. For relay node placement problem, it is assumed that HWSN contains unreachable area, where sensor nodes could not be placed. For energy efficient routing, it is transformed to path length of wireless communication. As the problem is non-deterministic polynomial (NP) hard, a heuristic method called whale optimizer is used. The paper studies the effect of whale optimizer method with three adaptive schemes. Numerical simulations are done to test the proposed method for HWSN. The analysis and discussion show that the proposed method is useful to address NP hard relay node placement and energy saving problems for HWSN.


I. INTRODUCTION
Wireless sensor network refers to a number of wireless sensors dispersed in an area to collect data information such as temperature, humidity, wind, and so on. HWSN means sensor nodes have different capabilities like communication range, functional, battery level, and so on [1]. HWSN has the characteristics of self-organization, real-time sensing, collaborative processing, wireless transmission, and so on. Recently, HWSN becomes a hot research topic. Its application fields and network scale are expanding constantly. In addition, many applications, such as national defense, hospital, environmental monitoring, have used HWSN to provide high quality of service for human beings [2].
The advantages of wireless sensors are low price and small size. Small size also makes wireless sensors having little battery capacity. This causes sensors are easy to fail in harsh conditions. Due to the limited resources of sensors, especially The associate editor coordinating the review of this manuscript and approving it for publication was Qilian Liang . the rare energy resources, reducing energy consumption and improving energy efficiency are major challenges faced by HWSN. Energy optimization has become a key issue in the study of HWSN. In addition, some sensors may play a role of relay in HWSN to transmit data information. Such sensors would run out of battery power more quickly than others. In HWSN based on image or video applications, data transmission needs a lot of energy. Thus, HWSN is vulnerable to become several separate network branches. Then data transmission becomes difficult to achieve. Therefore, how to effectively reduce the energy consumption of data transmission process and recover separated network branches are very important to improve the energy efficiency of HWSN [3].
Relay node placement is to recover the lost connectivity of HWSN by placing new relay nodes [1]. Previous studies show that relay node placement is NP hard problem [4], [5]. This means that relay node placement is more and more difficult when network scale increases in HWSN. In [6], the authors studied two distributed relay node positioning methods for HWSN. One is based on virtual force movements VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ of relays, and the other is based on game theory of clusters. Numerical results show that the second method is better for HWSN. In [7], the authors minimized node production cost, note placement cost, and transmission outage probability. A polynomial-time heuristic algorithm was proposed to produce suboptimal solutions. Numerical results show that the method was able to find near-optimal solutions. The method is useful for scarce resource HWSN [8]. In [8], the authors introduced whale optimizer to repair partitioned HWSN. Whale optimizer is a meta-heuristic method for global optimization problems. The results show the usefulness of the optimizer compared with state-of-the-art methods. In [9], the authors used four meta-heuristic methods to solve relay node placement problem. In HWSN, mobile sinks were deployed for data collection. Numerical results show that bat algorithm is the best for relay node placement [9]. In [10], the authors studied relay node placement problem with hop count as constraints. Hop count could affect network delay and reliability. Hence, designing survivable network is important when considering hop count constrained. Numerical results show that cover-based node placement is effective. In [11], the authors studied connectivity restoration for HWSN by proposing a distributed and autonomous method. Negotiators were introduced and decided reconnection paths by information exchange. Numerical results show that the method is able to quickly reconnect partitioned HWSN.
In [12], the authors studied an efficient low power radio for HWSN. The low power radio as well as a cross-layer routing method was able to maximize network lifetime. Numerical results show that network lifetime is improved by 53%, and network throughput is improved by 28%. In [13], the authors studied electromagnetism-like mechanism method for wireless mesh network. Mesh router node placement problem is also NP hard, which is similar to node placement in HWSN. Numerical simulations show that electromagnetismlike mechanism method is able to find near-optimal solutions for mesh router nodes in terms of coverage and connectivity. Swarm intelligence (SI) methods belong to metaheuristics. SI methods are created by researchers through learning and simulating social behaviors of swarm species such as ants, bees, fish flocks, whale flocks, and so on. SI methods include particle swarm optimization, artificial bee colony, whale optimization, and so on. In [14], the authors summarized state-of-the-art researches about SI methods for mobile wireless sensor networks. In addition, there are many modified SI methods based on original paradigms for solving problems in wireless sensor networks (WSN) [15]- [19].
Based on the short review of related works, it can be seen that SI methods has been applied to solve problems in both WSN and HWSN. These studies show that such topic becomes more popular than those in two decades ago. A reason may be because the effectiveness and efficiency improvements of SI methods. Another reason may be the gradually acceptance of such meta-heuristic methods. This paper tries to solve the reconnection and energy saving problems in partitioned HWSN. This paper studies whale optimization method with different adaptive strategies for the problems.
The contributions of the paper are as follows: (1) unreachable area is assumed in HWSN. Area around failed sensors or other terrible area in real world is not suitable for placing new sensor nodes. Such area should be removed from the whole area of HWSN.
(2) the cost of relay nodes and energy consumption of reconnected HWSN are set as target to be minimized. Thus, the cost of the reconnection HWSN is not high, and energy efficiency could be improved.
(3) different adaptive strategies for whale optimization method are tested to improve the performance of the method. Whale optimization method is used to optimize the cost of relay nodes and reduce energy consumption of data transmission.
The rest of the paper is organized as follows: in Section 2, the authors introduce the system model of HWSN. Section 3 gives the whale optimization method and the adaptive strategies. Section 4 contains numerical simulations of the proposed algorithm. Section 5 concludes the whole paper.

II. SYSTEM MODEL
In general, WSN is based on the development of digital circuit, wireless communication, micro motor system and other disciplines. With the rapid development of wireless communication technology, Internet technology and micro electromechanical technology, WSN has also attracted worldwide attention, and is believed to have a profound impact on the future of human life style In the future. People will directly perceive the objective world through the surrounding sensor networks, which will greatly improve people's ability to understand and transform the world.
HWSN mainly relies on different functional sensor nodes to complete the monitoring of the target area. This kind of sensor apparatus has the characteristics of miniaturization, cheapness and low power consumption. Sensor nodes can detect all kinds of objects distributed in the network area. Standard HWSN implements the monitoring, obtains the required data information and finally transmits it to base station through node jumping (ad hoc) mode. HWSN can be used in many aspects, such as temperature, humidity, noise, light intensity, etc. Because of the rapid development of micro sensor technology and wireless communication networking technology, HWSN has a broad prospect of development.
We assume that HWSN contains n source sensor nodes and a destination sink node. Sink node can also be base station. Source sensor nodes can collect and send data, and also work as a relay node to forward data to sink node, as is shown in Fig. 1. In the figure, the radius of sink node R and sensor node r are given. HWSN is partitioned to 4 branches. We assume that relay node in each branch is chosen from the branch, hence a cluster head node can be selected from each branches. According to bit error rate (BER) threshold, we chose relay node that BER is lower to transmit data to cluster head node.  Because data can be sent to cluster head node in a branch, cluster head node is able to stand for the related branch. The partitioned HWSN can be simplified to a network with sink node and cluster head nodes, as is shown in Fig. 2. In the figure, new relay node is placed such that partitioned HWSN becomes reconnected. This is the problem to be studied in the paper.
In the system model, we assume sensor nodes are placed randomly in a rectangular area. Uniform random distribution is proper for simulation real world node deployment. Source sensor nodes collect information by detecting the environment around. Then sensor nodes can forward the data to cluster head node in partitioned network or to sink node. We assume sink node is fixed in the rectangular area. Sink node is able to receive and process data information in the HWSN. Cluster head node is selected from source sensor nodes. Such sensor nodes are battery powered and may fail due to run out of battery, especially when battery discharging is fast due to heavy load or harsh environment. When some sensor nodes fail, they cause imbalanced data transmission, which leads to failure of more nodes. Although sensors are cheap and can be densely deployment, the whole network still faces the chances of large number node failure.
Sink node is able to detect data traffic flow in the network. If flow amount of some nodes is lower than a threshold, sink node can know the failure of sensor nodes. Data information can be collected through other sensor nodes.
This paper tries to solve relay node placement problem. Thus, system model does not detail discuss channel assignment, modulation method, cluster creation, and so on.
In the system, suppose S is source sensor node, D is destination node (sink node), R is relay node. The distance between S and D is d sd , the distance between S and R is d sr . At time t, the data signal received by R is: where P A is transmission power of S, h sr is channel coefficients from S to R. n sr is Gaussian white noise. The data signal received by D is: where h sd is channel coefficients from S to D. n sd is Gaussian white noise. The data signal from R to D is: where P R is transmission power of R, h rd is channel coefficients from R to D. n rd is Gaussian white noise. Without loss of generality, Gaussian white noise is assumed to a Gaussian distribution with a noise. Without loss of generality, Gaussian white noise is assumed to a Gaussian distribution with a mean of 0 and a variance of N 0 .
In the system, suppose N S is the number of source sensor nodes, N R is the number of relay nodes, C R is the cost of a relay node, E SR is the energy consumption from source sensor node to relay node, E RD is the energy consumption from relay node to destination node. We assume relay nodes have the same cost. E SR and E RD depends on data transmission load and distance between nodes. The system model of HWSN is: where the objective summarizes the cost of relay nodes and network energy consumption in the model. The objective is minimized under the conditions that relay node is not placed in unreachable read. The distance between source sensor node and relay node is not greater than the radius r. the distance between relay node and sink node is not greater than the radius R. Thus, the network is reconnected by fulfilling the requirements.
Minimizing the cost of relay nodes is equivalent to minimizing the number of relay nodes, as each node has the same cost. Minimizing the network energy consumption is to produce an energy efficient HWSN. If we assume energy consumption is the same for a unit distance, then system model (4) becomes: From system model (4) and (5), the positions of relay nodes are the key for the problem. The distance is computed by the positions of relay nodes, source sensor nodes, and sink node. The number of relay nodes also affects total distance. In this paper, the determination of N R and positions of relay nodes is done by whale optimization method.

III. ADAPTIVE WHALE OPTIMIZATION METHOD
Since the 1980s, SI has opened the door to a new type of algorithm, which has led to in-depth discussions and research by different disciplines. Nowadays, SI has been used in many fields such as electronics, communications, control, and so on. SI methods are based on multiple individuals as the subject of exploration. It uses the effective social information between groups to communicate with each other and makes corresponding judgments. It has an oversight role in changing the search position of individuals, so as to further find the optimal exploration. Whale optimization (WO) method was proposed in 2016 [20]. It is a SI method which mimics social behavior of humpback whales.

A. WHALE OPTIMIZATION METHOD
WO method comes from bubble-net hunting strategy. In WO, the target prey is assumed to be the best solution that the method has found. Following hunting strategy, other search agents update their location to find the best search agent. The hunting strategy is equivalent to the equations: where D is moving direction toward target prey, A and C are coefficient vectors. X * (t) stands for the target prey, where t is iteration counter. Vectors A and C is computed by: where r is a random vector in [0, 1], a is linearly reduced from 2 to 0 with the iteration. Vectors A and C can be positive or negative, hence, humpback whale can move either directions around target prey in exploration and exploitation phases. Shrinkage bracketing method and spiral updating position method are used to implement bubble net behavior of humpback whales. Shrinkage bracketing method is achieved by linearly reducing the value of a. Spiral updating position method is to compute trajectory shape by: where D is distance between whale i and target prey, b is a constant to define the shape of logarithmic spiral, l is a random number in [−1, 1]. In WO, both (7) and (10) are used to produce new solutions. Both equations are used with equal probability.

B. ADAPTIVE STRATEGIES
In WO method, search behavior is mainly controlled by shrinkage bracketing, (7) and (10). The physical meaning of (7) and (10) is solid due to mimicking hunting behaviors of humpback whales. The physical meaning of shrinkage bracketing deserves further discussion. This paper discusses three different shrinkage strategies including original linearly reduction.
In physics, a small ball rolls down on a plane between a point and a lower point. The fastest rolling curve is not the straight line, while it is a curving line, called Brachistochrone curve. Besides linearly reduction curve C1, we take an upward convex curve C2, and a downward convex curve C3, as is shown in Fig. 3. The downward convex curve is similar to Brachistochrone curve, while the upward convex curve is the symmetry of Brachistochrone curve respect to linearly reduction curve. WO method can be attached with each of the three adaptive strategies. WO method with adaptive strategy C1 is called AWO1. Similarly, WO method with adaptive strategy C2 is called AWO2; WO method with adaptive strategy C3 is called AWO3.
The three adaptive WO methods are used to solve relay placement problem in HWSN. The procedures of the optimization are shown in Algorithm 1. Adaptive WO method is used in line 4 and 7. It can be seen that the three WO methods can be interfaced with the algorithm. Adaptive WO method is responsible for determining N R , and positions of relay nodes so that the objective of (4) or (5) is minimized under the constraints.

IV. SIMULATION EXPERIMENTS AND RESULTS ANALYSIS
In order to assess and study the performance of the proposed relay placement method, we simulate HWSN in this paper. Before the analysis, we make some assumptions and regulations as follows. In HWSN, sensor nodes and sink node are stationary once they are deployed in the network. Rayleigh flat fading channels are used between sensor nodes. Fading property between channels is independent. Sensor nodes have Algorithm 1 procedures of solving (4) by adaptive whale optimization method 1 Input: HWSN setting parameters, AWO setting parameters 2 Output: optimal solution 3 For each iteration t 4 Use adaptive WO method to search candidate solution of N R , and positions of relay nodes. 5 Check and regenerate positions if relay nodes are located in unreachable area. 6 Compute distance and energy consumption for (4) or (5). 7 Update a value for adaptive WO method. 8 End For the same coverage radius. The radius of sink node is larger than sensor nodes. Adaptive WO method is used to select the number of relay nodes and the positions of relay nodes. We assume that the network is distributed in a square area with size 1000 m×1000 m, as is shown in Table 1. Table 1 also lists other parameters for simulating HWSN.

A. RESULTS FOR THE THREE ADAPTIVE STRATEGIES
In order to study the validity of the three adaptive strategies, we test AWO1, AWO2, and AWO3 methods for relay placement in HWSN. Each method is independently run 31 times to get an average performance of the method. The results are shown in Table 2. In the table, the results are analyzed by five metrics. They are the minimum, median, maximum, mean and standard deviation (std) values of function objective, as is shown in model (5). The results show that the AWO2 method is slightly worse than the AWO1 method. The results of the AWO3 method on the five metrics are better than those of the AWO1 and AWO2 methods. In addition, the three adaptive strategies are compared by hypothesis test. Hypothesis test is implemented with significant level α = 0.05. The last column of Table 1 shows the p-values after implementing hypothesis test. We use hypothesis test to compare AWO1 and AWO3, and the result p = 0.0036 means that the AWO3 method is significantly better than the AWO1 method. We use hypothesis test to compare AWO2 and AWO3, and the result p = 0.0001 means that the AWO3 method is significantly better than the AWO2 method. Thus, the adaptive strategy C3 shows the best performance; the adaptive strategy C2 shows the worse performance. This means that the Brachistochrone curve property is also applicable to tune parameter for whale optimization algorithm.
The number of relay nodes is now discussed. In terms of the cost of placement new relay nodes, large node number takes more cost than small node number. Hence, the number of relay nodes can evaluate the solution cost of a method. The results are shown in Fig. 4. The number of relay nodes deployed by the AWO1 method is less than the number deployed by the AWO2 method. The number of relay nodes deployed by the AWO3 method is the least among the three adaptive strategies. We can see that there is an outlier of the result of the AWO3 method. The outlier shown in Fig. 4 is above the median results of the AWO1 and AWO2 methods. As can be seen from the figure, tuning parameter α is able to affect the performance of the WO method. Based on the analysis, we find that the AWO1 and AWO3 methods are able to solve relay placement problem in HWSN, while the AWO3 method shows the best performance.

B. COMPARISON WITH OTHER METHODS
In order to verify the proposed method, we compare the AWO3 method with several recent reported methods. In [21], the authors used grey wolf optimization (GWO) method to solve relay placement problem. Convex hull method was used to find relay node positions in damaged area of the network. In [22], the authors proposed an Optimized Relay node placement method based on Convex hull method (ORC). They also used neighbor nodes to compute Steiner point positions. In [23], the authors proposed a method for connected single cover problem (CSCP). The problem requires a sensor node is covered by a relay node. In this section, we compare the AWO3 method with the three methods with the number of partitions from 5 to 8.
The results are shown in Fig. 5. It can be seen from the figure that the number of relay nodes increases with the increase of the number of partitions. This is true for all methods, which means that more relay nodes are needed if HWSN VOLUME 8, 2020 is partitioned to many separate parts. The curve with star symbol shows the result of CSCP method. This method requires more relay nodes than the other methods. Hence, it costs more budget than other methods. Except the CSCP method, the curves of the GWO, ORC, and AWO3 methods show similar shape. For partitions from 5 to 8, the AWO3 method shown in square symbol needs less relay nodes than the GWO and ORC methods.

V. CONCLUSION
Relay node placement is to recover the lost connectivity of HWSN by placing new relay nodes. Previous studies show that relay node placement is NP hard problem. This means that relay node placement is more and more difficult when network scale increases in HWSN.
From the literature, it can be seen that SI methods has been applied to solve problems in different WSN problems. These studies show that such topic becomes more popular than those in the past two decades. This paper tries to solve the reconnection and energy saving problems in partitioned HWSN. Relay placement problem is model in (4) and (5). The model objective is to minimize relay node cost and energy consumption under the conditions that relay node is not placed in unreachable read. The distance between source sensor node and relay node is not greater than the radius r. the distance between relay node and sink node is not greater than the radius R. Thus, the network is reconnected by fulfilling the requirements. This paper studies whale optimization method with different adaptive strategies for the problems. The three strategies is to tune parameter α of the WO method. As can be seen from simulation result in Section 4.1, tuning parameter α is able to affect the performance of the WO method. Based on the analysis, we find that the AWO1 and AWO3 methods are able to solve relay placement problem in HWSN, while the AWO3 method shows the best performance. As can be seen from simulation result in Section 4.2, the AWO3 method shown in square symbol needs less relay nodes than the GWO, ORC, and CSCP methods. Thus, compared with three state-of-the-art methods, the AWO3 method also shows the best performance. The method can be used to optimize the cost of relay nodes and reduce energy consumption of data transmission in partitioned HWSN.