Abstract

Wireless sensor network (WSN) is an important part of the Internet of Things. With the application and development of the Internet of Things, the heterogeneity of WSN is put forward a higher demand. Node placement is a critical step in the heterogeneous wireless sensor network (HEWSN). It is very important to optimize the node placement to fundamentally prolong the lifetime, improve the performance, and decrease the cost of the HEWSN. In this paper, the node placement optimization problem of HEWSN with different sensing types’ nodes is studied. An improved algorithm named neighbor nodes directed evolved nondominated sorting genetic algorithm (NN-DENSGA) is proposed to solve the multiobjective optimization problem. Homogeneous neighbor nodes are considered to promote directional evolution, and heterogeneous neighbor nodes are considered to repair the coverage holes. In addition, a forced update strategy is designed to increase diversity of population. Experiments have shown that the proposed algorithm not only has improvements in optimization performance but also in convergence speed and stability.

1. Introduction

Wireless sensor network (WSN) is a collection of sensor nodes with characteristics of self-organization characteristics. Sensor nodes form a network through routing protocols to realize information collection and data transmission in specified target monitoring area [1]. For different functions and purposes, sensor nodes can be divided into different types according to their sensing ability, computing ability, communication ability, and energy. A heterogeneous wireless sensor network (HEWSN) is a network composed of many types of sensor nodes. In recent years, most studies have focused on homogeneous wireless sensor networks (HOWSN) with single sensor node types [24]. However, in real applications, WSNs with different types of sensor nodes are more practical. Therefore, the heterogeneity of WSNs must be considered.

Node placement is the first step when building a WSN, as well as for the HEWSN. A good node placement can reduce consumption and prolong the WSN’s lifetime while obtaining satisfactory coverage. In HEWSN, sensor nodes may have different functions, sensing types, mobility, and various parameters. Some researchers have proposed appropriate node placement schemes and node placement optimization algorithms for specific HEWSN [58]. This paper is mainly aimed at HEWSNs with different sensing types and the same parameters. It is also known as hardware heterogeneity. Under hardware heterogeneity, prolonging the lifetime of WSNs is one of the main problems faced by WSNs [9].

There are few studies on node placement problem specifically for WSN with hardware heterogeneity. Cao et al. [10] focused on node placement in heterogeneous wireless directional sensor networks and proposed several distributed parallel multiobjective evolutionary algorithms (MOEAs) to optimize the coverage connectivity quality and lifetime of the network. However, Cao et al.’s study has not considered the node movement in optimization. Therefore, the proposed algorithms can only design the initial node placement but cannot adjust the existing node placement. Wang et al. [11] used the Hungarian algorithm to solve the movement problem represented by a minimum cost bipartite assignment problem and proposed a greedy movement algorithm (GMA) to optimize the coverage and movement cost. However, the speed of convergence is not fast enough. In my previous studies [12], a directed evolved NSGA2 (DENSGA) for HOWSN has been proposed. The algorithm uses the node density to promote the directional evolution of node placement. However, there are still challenges in the algorithm. For instance, the algorithm needs to avoid falling into local optimum. The speed of convergence still needs improvement.

This paper mainly studies the node placement optimization algorithm for HEWSN, aimed at designing an algorithm with strong adaptability and fast convergence speed on the basis of previous studies. Specifically, the main contributions of this paper are as follows: (1)Improve the model based on coordinate displacement and the optimization algorithm DENSGA to make it applicable for HEWSN(2)Consider the effects of neighbor nodes. Find the same and different types of neighbor nodes, and then, put them into homogeneous and heterogeneous neighbor node sets. Adaptively calculate the crossover probability according to the node density of the corresponding type of sensor nodes. The calculation method considers not only the redundancy exclusion between homogeneous neighbor nodes but also the coverage hole detection through heterogeneous neighbor node sets(3)Propose the forced crossover probability. It can increase the diversity of the population and effectively prevent the node distribution from falling into the local optimal solution

The rest of the paper is organized as follows: Section 2 describes the model for node placement problem in HEWSN; Section 3 introduces the DENSGA for HEWSN; Section 4 introduces the proposed operator and the improved algorithm; Section 5 contains the experiments, results, and analysis of the proposed algorithm when applied to the node placement problem. Section 6 contains the comparison experiment between NN-DENSGA and other algorithms. Finally, some conclusions are drawn in Section 7.

2. Model for Node Placement Problem in HEWSN

A HEWSN deploys sensor nodes in the monitoring area. These sensor nodes can be divided into kinds and have the same parameters except for the sensing type. The sensor node set of the th () kind is . Node placement problem in HEWSN needs the deployment of sensor nodes so that each kind of node can meet the requirement of coverage, and the HEWSN can meet some other requirements of application, such as the energy consumption and balance of the whole network, the moving distance for adjusting the layout.

In this paper, the node placement optimization model based on node coordinate displacement [12] is adopted. The coverage and the network lifetime are taken as two optimization objectives. It is a constrained multiobjective optimization problem, and the model is described as follows: where and , respectively, represent the horizontal and vertical displacement row vectors of all the nodes’ coordinates; and are the row vectors of the th node’s coordinate displacement; and , respectively, represent the length and width of the monitoring area; is the initial node coordinate vectors; is a coefficient that restricts the movement of nodes. In this paper, .

There are different types of sensor nodes with different sensing capabilities in HEWSN. Clearly, the objective of coverage should comprehensively take the coverage of each type of node into consideration. Therefore, the average coverage of different types of nodes can be chosen as the primary optimization objective of the problem, as shown in the following equation: where represents the total number of node types, represents a node type, and represents the coverage of the th type.

The objective of the lifetime (including energy consumption and node movement) [12] is shown in the following equation: where is the remaining energy of the th node after rounds, which can be calculated by the LEACH protocol, energy consumption model in [13]; represents an energy consumption coefficient of node movement; denotes the moving distance of the th node.

3. DENSGA for HEWSN

The DENSGA has proposed a directional crossover operator which is based on the NSGA2 [12]. In HOWSN, the directional crossover operator will determine a chromosome fragment’s crossover probability by the coverage degree of the grid point where the corresponding node is located. The chromosome segments corresponding to nodes in redundant positions will have a high crossover probability. The adaptive crossover probability can help get better coverage within a limited time.

This method is also effective in HEWSN. It only needs to calculate the node density distribution for different types of nodes. Therefore, this section will adjust the directional crossover operator to make it suitable for HEWSN. It is also a preparation for further improvement in the next section.

As different types of nodes collect different types of data, a completely covered position should be covered by all types of nodes. When calculating the density distribution, only homogeneous nodes should be considered.

Figure 1(a) shows a random placement graph of HEWSN with 2 types of nodes. Figures 1(b) and 1(c) show their gray-scale map of node density, respectively. Comparing the three images, the more times a certain pixel point is covered by a type of node, the darker it is in the gray-scale map, and the higher the crossover probability of a node in this position will be.

To obtain the node density, the first step is to judge whether a pixel point is covered by the th node, as shown in Equations (4) and (5). Then, count the number of times that each pixel is covered by how many nodes of the same type. These numbers can be called overridden numbers. The overridden number of the pixel, covered by all the th type nodes, is described in Equation (6). where represents type of the nodes, represents the node set of type , and expresses whether the pixel is covered by the th node.

If there are kinds of nodes in HEWSN, number of matrices can be obtained. Among them, the overridden matrix of the th type of nodes can represent the density distribution of the th type node, as shown in Equation (7). The th type node’s overridden number of the position of the th node can be obtained by searching the matrix , defined in Equation (8). where represents overridden numbers of the pixel covered by all the th type nodes; and , respectively, represent the row vectors of the th node’s coordinates.

The larger is, the more densely homogeneous the nodes are. The crossover probability of the corresponding chromosome fragment can be calculated according to [12]. For subsequent improvement, the crossover probability in this paper is changed to the cumulative calculation. Set the initial crossover probability of all nodes to 0. If there is redundancy at the position of the th node, a certain crossover probability will add to . In addition, there is an upper limit on the crossover probability for each node. The equation is shown as follows: where represents the crossover probability for the th node; , , and are three constant parameters, set as 0.5, 0.9, and 0.95 in this paper, respectively..

4. The Improved Neighbor Nodes Directed Evolved Algorithm

The original directional crossover operator only considers the redundancy exclusion between nodes of the same type, cannot find the coverage hole. In addition, the experimental results in [12] show that in regions with a uniform initial node placement, the directional crossover operator may lead to low crossover probability for some nodes, which may depress the population diversity and result in a local optimum. Therefore, the influence of node density on neighbor nodes and a forced update probability are proposed in this section to help improving the performance of algorithm.

The proposed method is based on the original directional crossover operator, named neighbor node directional crossover operator. The operator is an improved multipoint crossover operator. Each individual can be represented by a chromosome with fragments. The crossover probability of each fragment can be adaptively calculated according to the node density of the corresponding node and its neighbor nodes.

4.1. Neighbor Nodes

In many studies, neighbor nodes refer to the nodes connected to the selected node for data transmission. They are neighbors in the network topology. However, this paper mainly aimed at the coverage. As long as the moving distance is short, the coverage hole can be filled nearby. Therefore, the neighbor nodes proposed in this section are not neighbors in the network topology, but neighbors in the space distance. Nodes whose coordinates are closed to the selected node can be defined as its neighbor nodes. If the coordinate of node is , node which satisfies Equation (10) is one of the neighbor nodes of the node . where represents the range of neighbor; and , respectively, represent the horizontal and vertical position coordinates of the th node’s.

Figure 2 shows a selected node and its neighbor nodes in HEWSN.

For the range of neighbor , the spacing between each node in a uniform distribution (shown in Figure 3) can be used as a reference. For HEWSN, the spacing of each type of node can be calculated according to the size of the monitor area and the sensing radius of the sensor node. As shown in Figure 3, for uniform distribution in the square monitoring area, the number of the th nodes in each row/column is . Therefore, the uniform distribution spacing can be calculated by the following equation:

When , , , and , the uniform distribution spacing can be calculated that . Appropriately enlarged and set .

When all neighbor nodes are found, they should be classified according to the node type to get the neighbor node sets of each node. The neighbor node set of the th node of the node is , where is the node number of the th node satisfying Equation (10) and is the number of neighbor nodes of the th node of the node .

In this way, the neighbor node set for each type of each node is obtained. According to the homogeneity and heterogeneity between the neighbor nodes and the selected node, neighbor nodes can be further divided into homogeneous neighbor nodes and heterogeneous neighbor nodes. The crossover probability calculation of these two kinds of neighbor nodes will be designed, respectively.

4.2. Homogeneous Neighbor Nodes

Figure 4 shows the homogeneous neighbor nodes in HEWSN. For the network composed of all nodes of the same type in HEWSN, it can be regarded as a HOWSN. Except for adjusting the crossover probability which is corresponding to the selected node itself (as shown in Equation (9)), the homogeneous neighbor nodes’ crossover probability should also adjust.

For a node , judge the type of node and build a homogeneous neighbor node set . For a homogeneous neighbor node in this set, a crossover probability can be added and calculated by the density of the node of type and the distance between the neighbor node and the selected node.

When , this position is covered by only one homogeneous node , and the homogeneous node placement at this position may be suitable or sparse. In addition to fixing the position of the selected node to prevent coverage decrease, the moving probability of homogeneous neighbor nodes should be slightly increased. It could help adjust the placement of the surrounding homogeneous nodes and prevent local optimization. Therefore, the crossover probability corresponding to homogeneous neighbor nodes should be slightly increased. The closer the homogeneous neighbor node is to the selected node , the greater the crossover probability will be increased. When , this position is covered by two homogeneous nodes, and the homogeneous node placement at this position may be suitable or dense. Since the crossover probability of the selected node has been appropriately increased, it is not necessary to adjust the crossover probability corresponding to its homogeneous neighbor nodes. When , this position is covered by at least three homogeneous nodes, and the homogeneous node placement at this position is evidently redundant. Even if the selected node moves, the density of homogeneous nodes in the local area is too high. Moving homogeneous neighbor nodes may make improvements. Therefore, the crossover probability corresponding to homogeneous neighbor nodes should be appropriately increased. The closer the homogeneous neighbor node is to the selected node , the greater the crossover probability will be increased. The equation is as follows: where represents the crossover probability corresponding to a homogeneous neighbor node ; represents the coordinate distance between and ; and are two constant parameters, set as and in this paper, respectively.

4.3. Heterogeneous Neighbor Nodes

Figure 5 shows the heterogeneous neighbor nodes in HEWSN. Heterogeneous neighbor nodes should be classified into different types, and then, analyze each type of heterogeneous neighbor nodes separately.

For a selected node of type , first choose a type of heterogeneous nodes . Find the th type node’s overridden number of the position in the matrix , and then find the th type heterogeneous neighbor node set . The crossover probability corresponding to heterogeneous neighbor nodes in the set should also adjust.

When , this position has not been covered by any th type node. There is a coverage hole of th type node. The moving probability of th type heterogeneous neighbor nodes should be increased to move the surrounding nodes to compensate for the hole. Since the movement of several neighbor nodes may lead to new coverage holes, the moving probability should be greatly increased. The closer the th type neighbor node is to the selected node , the greater the crossover probability will be increased. When or , the th type node placement at this position may be suitable. It is unnecessary to adjust the placement of this type of neighbor nodes and change the crossover probability corresponding to these nodes. When , the th type node placement at this position is evidently redundant. However, this has been considered in th type homogeneous neighbor nodes (shown in Equations (9) and (12)). Therefore, there is no need for repeated adjustment. The equation is shown as follows: where represents the crossover probability corresponding to a th type heterogeneous neighbor node ; is a constant parameter, set as in this paper.

4.4. Neighbor Node Directional Crossover Operator with Forced Update Probability

To prevent low population diversity because of the low crossover probability, a certain probability can be set to force update node placement. When the forced update condition is met, the crossover probability will be set to a high value.

The experiment results in [12] show that this situation is more likely to occur in the early stage of evolution, so the forced update probability should be higher at the beginning. However, with the node placement gradually optimized, nodes in some regions may have reached the global optimal placement. Then, the forced update probability should be reduced. Generally, the forced update probability is in a certain range and should decrease gradually with the increase of generation . The calculation of is shown in Equation (14), and the update of is shown in Equation (15). where represents the current generation, represents the max generation, and are constant parameters, and represents a randomly generated number between [0,1].

In neighbor-node directional crossover operator, Equations (9), (12), and (13) are combined to calculate the crossover probability. Calculate the currently forced update probability by Equation (14), and then, update the crossover probability by Equation (15). Finally, judge each chromosome segment of the paternal individual whether crossover occurred.

The proposed method introduces homogeneous and heterogeneous neighbor nodes and forced update probability on the basis of the directional crossover operator, so it is called the neighbor node directional crossover operator. It can quickly and effectively compensate for the coverage hole in HEWSN and effectively increase the diversity of the population.

4.5. The Flow of NN-DENSGA

Based on DENSGA, the neighbor node directional crossover operator is introduced to help fill coverage holes and increase population diversity. The improved algorithm for HEWSN is called neighbor nodes directed evolved NSGA2 (NN-DENSGA).

The flow chart of the NN-DENSGA for node placement problem of HEWSN is shown in Figure 6.

5. Parameter Analysis

Forced crossover constant coefficient and are the main parameters in NN-DENSGA. Among them, can be determined by calculation, which will be shown in Section 5.1. Therefore, will be tested and analyzed in this section.

5.1. Experimental Environment and Parameters

In this paper, the simulation of HEWSN and the test of algorithms are realized by MATLAB (Matlab R2016a). All programs have been run on a Windows 10 operating system (64 bits), with a computer configuration of 2.60 GHz processor and 32 GB RAM.

The proposed algorithm is implemented in a centralized architecture, and the base station is responsible for the execution of the algorithm and broadcasting the moving plan to all sensor nodes.

The HEWSN to be optimized consists of 100 sensor nodes randomly distributed in the area of to be monitored and a sink node outside the area. There are mainly two types of sensor nodes, with the same number, the same parameters, and different sensing types. LEACH is chosen as the WSN routing protocol, the energy consumption model, and related parameters are shown in [12].

Parameters used in the experiments are shown in Table 1.

In Section 4.4, the equation to calculate the forced crossover probability is shown in Equation (14) with constant parameters and . If is set between [0.05,], according to , it can be calculated that .

5.2. Parameter Analysis for

One of the forced crossover constant coefficients can determine the initial forced crossover probability value. In this experiment, set 6 different values for .

The influences of for a random node placements are shown in Figure 7, which is composed of (a) and (b), respectively, corresponding to two optimization objectives, and . Figure 7(a) shows the average of the first dominance level in 5 runs for different values of . Figure 7(b) shows the average of the first dominance level in 5 runs for different values of .

The following conclusions can be obtained from Figure 7: The value of has little effects on , but large effects on . If the value of is too small, the performance of final is not good. This is mainly because NN-DENSGA may have a poor population diversity and fall into local optimum. If the value of is too large, the may have a slow convergence. This is mainly because NN-DENSGA will degrade to NSGA2 and lose the ability of fast convergence.

In this paper, considering the optimization effect and convergence speed, choose .

6. Comparison Experiment between NN-DENSGA and Other Algorithms

In this section, NN-DENSGA will be compared with DENSGA [12] and NSGA2 [14] in the HEWSN’s node placement optimization experiments. DENSGA in this section is the modified algorithm for HEWSN mentioned in Section 3.

The experimental environment has been described in Section 5.1, and the parameters of NN-DENSGA and DENSGA used in the experiment are shown in Table 1. According to the parameter experiment in Section 5.2, set . Therefore, the change of forced crossover probability is shown in Figure 8. Tournament selection operator, multipoint crossover operator, and single point mutation operator are used in NSGA2, which , .

Besides, the optimization objectives of the regional optimization for node placement, and , four additional evaluation indicators are used in this paper. The coverage of each type of node and , comprehensive score [12], the total moving distance of nodes [12], the coverage growth in the unit distance [15] are selected as evaluation indicators.

The larger , , and is, the better the optimization results of the algorithm are. The smaller is, the less energy the node movement consumes, and the better the optimization result of the algorithm will be.

Randomly set an initial node placement (node placement 1). NN-DENSGA, DENSGA, and NSGA2 are used to optimize the node placement of HEWSN. To eliminate the influence caused by randomness, each algorithm will run 5 times and the average results are taken. The results of the nondominated solutions are analyzed and compared.

Figure 9 shows the results of different algorithms in each generation. Among the four figures, Figure 9(a) shows the average coverage curves, Figure 9(b) shows the average rest energy curves, Figure 9(c) shows the average score curves, and Figure 9(d) shows the max score curves. The average coverage curves and average rest energy curves, respectively, represent the average value of the first dominance level’s and . The average score curves and the max score curves, respectively, represent the average value made and the max value of the first dominance level’s .

Figures 9(a) and 9(b) show that NN-DENSGA can achieve node placement with better coverage and longer lifetime within fewer generations rather than DENSGA and NSGA2. Figures 9(c) and 9(d) show that the results of NN-DENSGA and DENSGA have better than NSGA2, while NN-DENSGA can get better results faster than DENSGA.

For further analyzing the optimization of these three algorithms, the average results and its standard deviations of all the nondominated solutions () in 5 runs are shown in Table 2, where the optimal results are highlighted in bold.

The following conclusions can be obtained from Table 2: The optimization results of DENSGA are a little better than NSGA2, but with higher standard deviations. It means that the stability of DENSGA is not good enough. Sometimes, DENSGA may fall into a local optimum due to low population diversity. Within 100 generations, the optimization results of NN-DENSGA are better than DENSGA and NSGA2 with lower standard deviations. It means that the performance and stability of NN-DENSGA are all best. To achieve better optimization results, the moving distance of NN-DENSGA is slightly larger than NSGA2 but still smaller than DENSGA, but its movement is the most efficient.

To eliminate the contingency and the effect due to the initial node placement, two other initial node placements (node placement 2 and node placement 3) are tested. The results are shown in Figures 10 and 11. Figure 10 shows that the conclusions obtained from node placement 1 and node placement 2 are similar. Figure 11 shows that in node placement 3, NN-DENSGA performs similar to DENSGA and much better than NSGA2. It can be concluded that, compared with DENSGA, the stability of NN-DENSGA has a significant improvement while the performance has also increased.

In addition, two nonparametric statistical tests, Wilcoxon Signed Rank Test [16] and Friedman Test [16], are used to compare the algorithms. In nonparametric statistical tests, the two optimization objectives ( and ) of the node placement problem are analyzed. NN-DENSGA, DENSGA, and NSGA2 tests for 10 different random initial node placements and each situation run 5 times. The results are shown in Table 3.

The and can be ranked according to their values. Large rank values represent better performances. Let be the sum of ranks for the problems in which the first algorithm outperformed the second and the sum of ranks for the opposite. The larger the difference between and is, the more differences in the algorithm performance are [16]. A value provides information about whether a statistical hypothesis test is significant or not, and it also indicates something about how significant the result is: the smaller the value, the more obvious the differences between two algorithms [17].

The Wilcoxon Signed Rank Test is used to compare NN-DENSGA with one other algorithm. The results of the Wilcoxon Signed Rank Test are shown in Table 4.

The following conclusions can be obtained from Table 3: NN-DENSGA shows an improvement over DENSGA and NSGA2, especially in terms of . The of NN-DENSGA shows an improvement over NSGA2 with a level of significance and over DENSGA with a level of significance .

The Friedman Test can detect differences over the whole multiple comparisons. The box-plot of Friedman Test results are shown in Figure 12.

Figure 12 shows that NN-DENSGA has an improvement on over NSGA2 and DENSGA. NSGA2 and DENSGA are not stable enough, rarely achieve good optimization results. The stability of NN-DENSGA is better than that of NSGA2 and DENSGA.

To further analyze the convergence speed of these three algorithms, the generations of the algorithms that average coverage reaches the assigned values are shown in Figure 13. The algorithm tests for 5 different random initial node placements and each situation run 5 times. to , respectively, represent the generation in which average reaches 0.90 to 0.94 for the first time. The smaller to are, the faster the convergence speed is.

Figure 13 shows the convergence speed for different algorithms. It is obvious to find that NN-DNSGA can obtain the required coverage faster than DENSGA and NSGA.

In conclusion, the improvements proposed in this paper are effective. Neighbor node directional crossover operator can help repair the coverage holes and improve the optimization performance and convergence speed. The forced update probability can help increase population diversity, prevent falling into local optimum, and enhance the stability and universality of the algorithm. Therefore, NN-DENSGA can obtain satisfactory node placements in HEWSN.

7. Conclusions

In view of the increasing demand for HEWSN with different sensors in practical applications, this paper proposes an improved algorithm called NN-DENSGA for the node placement optimization problem in HEWSN.

In this paper, the directional crossover operator is modified to apply for HEWSN. Then, the influences of neighbor nodes are considered and analyzed. In addition, a forced update strategy is proposed to increase the diversity of population. Finally, a new neighbor node directional crossover operator with forced update probability is designed. Experiments show that the proposed algorithm has improvements in both searching performance and convergence speed when solving the node placement problem in HEWSN. It also has great improvements in diversity and stability, which ensure NN-DENSGA can achieve satisfactory results each time.

In conclusion, the proposed algorithm can effectively increase performance and extend the lifetime of HEWSN with a low moving cost. It also provides a theoretical and experimental basis for the setting and maintenance of the Internet of Things composed of different sensor nodes. However, in this paper, sensors differ only in the sensing type. In future research, more differences between sensors will be considered, while the convergence speed and stability of the algorithm need to be further improved.

Data Availability

All data, models, or code generated or used during the study are available from the corresponding author by request.

Conflicts of Interest

The authors declare no conflict of interest.

Acknowledgments

The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the Youth Fund of Fundamental Research Funds of Jiangnan University, JUSRP122034.