Energy Aware Deployment Method in Heterogeneous Farmland WSN

Farmland environment has influence on the signal propagation of wireless sensor network (WSN). The network coverage and connectivity performances largely depend on the deployment method. In order to prolong the network lifespan, renewable energy was introduced to a part of the network nodes due to the cost issue. An improved energy aware deployment method is proposed in this paper. The aim of the paper is to maximize the network lifespan, lower the network cots, increase the energy utilization renewable energy nodes and balance the residual energy of the battery-power nodes. An energy consumption model was established in the consideration of deployment constraints over network coverage, connectivity, and stability. An improved particle swarm optimization (PSO) algorithm was designed to optimize the performance of the network model. A penalty function was included to resolve the problem which contain both continuous and discrete variables. The number of renewable nodes with the best cost-lifespan ratio was concluded. The simulation results demonstrate that the propose method increases the renewable energy utilization when the renewable energy source is good. Also the network keeps stable when the renewable energy source is off. The overall energy consumption of battery nodes were reduced and balanced. Therefore, the proposed deploy method prolong the network lifespan. Keywords—wireless sensor network, energy heterogeneity, renewable energy, node deployment, energy aware deployment


Introduction
The wireless sensor network (WSN) technology has been extensively applied to largescale farmland environmental monitoring. Through real-time collection of environmental parameters, the WSN provides complete, precise and timely information for agricultural production and management, which in turn increases the yield efficiency [1]. Depending on the lifecycle of crops, the cycle of farmland environmental monitoring often takes a long time, setting a high demand on the power supply to the nodes. Since most farmlands are located in remote areas, the existing farmland WSNs are mostly powered by batteries [2]. The limited energy storage of batteries fails to meet the needs of long-time monitoring, and confines the lifecycle of the network.
To avoid the inconvenience of wired power supply and prolong network lifecycle, a viable option lies in realizing continuous power supply to the nodes with the rich renewable energy in farmland. However, it costs much more to collect renewable energy from the environment than power the nodes with batteries [3]. To make matters worse, agricultural production is highly sensitive to the increase of facility cost. Therefore, the WSN application in farmland must strike a balance between effective cost control and prolonged network lifecycle [4].
In light of this, a reasonable node deployment should be made to create an efficient transmission path for network data. Such a path helps to reduce and balance the energy consumption of the nodes, and thus extends the lifecycle of the network [5]. Featuring high cost and strong energy demand, renewable energy nodes complicates the deployment of nodes in the farmland WSN, which often covers a vast area [6]. If the farmland WSN contains some renewable energy nodes, it should be optimized through effective node deployment to achieve the following goals. First, maximize the use of energy from renewable energy nodes to reduce the energy consumption of nonrenewable ones, and to prolong network lifecycle; Second, increase operational stability during the periods of unstable energy from renewable energy nodes by reducing and avoiding network coverage holes and poor communication arising from insufficient renewable energy [7].
So far, much research has been done on WSN node deployment, as well as the classification and methods of deployment. By node types, the WSN node deployment is divided into homogenous deployment and heterogenous deployment [8]. The homogenous deployment focuses on the overall network performance, i.e. the coverage of monitoring area and the decrease of total energy consumption [9]. Some existing algorithms can effectively optimize sensor deployment in 2D/3D space and partially improve network coverage, thereby saving the total energy consumption and extending the network lifecycle. By contrast, the heterogenous WSN deployment attaches more importance to efficient utilization of high-performance nodes, seeking to offset the negative effect of general-performance nodes on the overall network performance [10]. The heterogenous deployment relieves the shortage of network energy with high-performance nodes like renewable energy nodes, and realizes rapid computing and large temporary data storage with heterogenous computing nodes. In this way, this type of deployment substantially improves the overall network performance.
To overcome the high-density and "hot spot" problems in heterogenous deployment, Ji et al. proposed to optimize node deployment with a binary particle swarm optimization (PSO) method based on multi-objective optimization, which maximizes regional coverage and minimizes network energy consumption. Liu et al. treated highperformance nodes as cluster heads of hierarchical network structure, turning heterogenous node deployment into position selection of cluster-head nodes. For strategic deployment of cluster-head nodes, they also presented heuristic K-mean and simulated annealing (KMSA) algorithm, and conducted simulation analysis at different network sizes and number of clusters. Starting from simulated annealing, Li et al. put forward a deployment method with optimal cost for high-density deployment of het-erogenous sensor network nodes, and heterogeneous distribution of monitoring objectives. The purpose is to minimize the cost of heterogenous node deployment with the premise of good network coverage and strong fault-tolerance. Probing into the deployment of heterogenous WSN nodes, Yu et al. created a heterogenous node deployment algorithm based on addressing in an attempt to optimize the number and position of such nodes.
In pursuit of low cost and good coverage deployment plans, the above studies have achieved certain effects with the proposal of various optimization algorithms. Nevertheless, these algorithms, putting more emphasis on network coverage than network energy, fail to ensure the heterogeneous energy distribution among the nodes. For heterogenous network, node deployment and the ensuing distribution of energy consumption among network nodes are essential to network operation. In light of the features of farmland WSN, the author raised an energy-heterogeneous network deployment plan (EHNDP) to optimize the number and position of renewable energy nodes in the network, and increase the availability of renewable energy nodes, thus reducing network deployment cost and extending network lifecycle.

2
System model and problem description

Network model
Energy-heterogeneous WSN model. In this research, all nodes are assumed to distribute in a circular region with the radius of R, and the sink node is assumed to lie at the center of the region. The other settings of the network model are as follows: In the heterogeneous WSN, the sensor nodes are either renewable energy nodes or non-renewable energy nodes. The number of renewable and non-renewable energy nodes is denoted as n r and n b , respectively; Hence, the total number of the two kinds of sensor nodes deployed in the region can be obtained by n=n r +n b . Moreover, p r (i)(i=1,2,…,n r ) refers to the i-th renewable energy node, and p b (i)(i=1,2,…,n b ) refers to the i-th non-renewable energy node. The cost of one renewable energy node c r is greater than the cost of one non-renewable energy node c b . The two kinds of nodes are functionally consistent in data acquisition and communication, and each acquisition node collects q 0 bit of data per unit time. The communication radius r c equals twice the sensing radius r s of each node.
Energy model of sensor nodes. The sensor nodes consume energy in data processing, sensing and communication. The energy consumption in communication exceeds that of data processing and sensing combined. Hence, this paper mainly considers the energy consumption of sensor nodes during the communication. For each node, the energy consumed to send 1 bit of data is E t =ad ! +", and that consumed to receive 1 bit of data is E r =#. Hereinto, d is the distance between sending and receiving nodes; ! is the path loss factor related to the wireless signal transmission environment; " is the energy consumption of the transmitting circuit for sending unit data; # means the energy consumption of the receiving circuit for receiving unit data.
Data transmission model. The network lifecycle directly hinges on data transmission, a mirror of network structure. The author adopted the hierarchical network, a popular structure of largescale WSNs, as the network structure. In the hierarchical network, the data in an acquisition node are firstly sent to the nearest backbone node via multi-hop transmission, for which the backbone nodes are constantly changing depending on the residual energy. In most cases, renewable energy nodes act as backbone nodes if they exist around non-renewable energy nodes, and non-renewable energy nodes send data only at the failure of renewable energy nodes.
As shown in Figure 1, the backbone nodes send the collected data to the sink node via multi-hop transmission. The transmission has two prominent features. First, the data are forwarded to the sink node direction by one or more of backbone nodes; Second, network nodes prefer to transmit data to renewable energy nodes. For any node, the data volume it receives is dependent on the local layer of the node, the type of adjacent nodes, and the distance between the node and the nearest renewable energy node.

Problem description
Unlike the homogenous deployment of WSN nodes, the heterogenous deployment must take account of network connectivity, network coverage, and the effect of network cost and energy on lifecycle, because the heterogenous WSN model signifies that the network contains high-performance, high-cost nodes. The large number of high-performance renewable energy nodes is a mixed blessing. For one thing, it extends the network lifecycle; for another, it pushes up the network cost. Should the renewable energy nodes remain at a fixed number and proportion, their effectiveness may vary with different deployment plans.

Energy-heterogeneous network development optimization model
As mentioned above, in order to realize an efficient and high-performance WSN, the optimal node deployment plan must simultaneously ensure good connectivity and coverage, achieve the longest possible lifecycle, and maximize network operational stability. Therefore, the cost-lifecycle ratio of energy-heterogeneous wireless network was taken as the objective function of node deployment under the constraints of network connectivity, coverage and operational stability.

Objective function
The major goal of the EHNDP is to improve network performance by obtaining the longest possible network lifecycle through node deployment. Whereas the increase in the number of nodes prolongs the network lifecycle, and pushes up the deployment cost, the lifecycle and network cost are mutually constraining. Hence, the costlifecycle ratio, i.e. the network operational time per unit cost, was selected as the optimization goal. The objective function goes as follows: iJOE -Vol. 14, No. 5,2018 In the network, the renewable energy nodes acquire energy from the environment. If there is sufficient renewable energy, the remaining low-energy renewable energy nodes can absorb energy immediately and resume working. Thus, network lifecycle is mainly affected by the residual energy of non-renewable energy nodes. The network lifecycle T was defined as the working time of the first non-renewable energy node until the node fail, and the objective function is written as: where the cost-lifecycle ratio ! expresses the trade-off between deployment cost and network lifecycle. The node deployment should bring about the minimum costlifecycle ratio.
According to the features of the multi-hop data transmission, the acquisition nodes close to the sink node consume more energy than those away from the sink node; backbone nodes, as major intermediate points of data transmission, consume more energy than non-backbone nodes. If there are only non-renewable energy nodes, backbone nodes will change constantly to balance energy consumption; if there are renewable energy nodes around non-renewable energy nodes, renewable energy nodes will act as backbone nodes, and non-renewable energy nodes send data only at the failure of renewable energy nodes. For minimum energy consumption of nonrenewable energy nodes, the multi-hop between backbone nodes should fall on nonrenewable energy nodes as much as possible. Through the above analysis, the following steps were presented to estimate the maximum energy consumption of nonrenewable energy nodes: If the non-renewable energy node j is a backbone node located on the i-th monitoring layer, then the node j s which sends data to node j must be an adjacent node of node j and located on the i+1-th monitoring layer. Besides, there should be no renewable energy node on the i-th layer within the communication range of node j, and no adjacent renewable energy node on the i-th layer within the communication range of node j s . These requirements are expressed as: Let b l be the head node of the non-renewable energy cluster on the i-th layer, and k l be the number of head node on the corresponding i+1-th layer that meets the above requirements. Then, the per unit time energy consumption of head node b l in communication is: where q0 is the data volume acquired by each node per unit time; ! ! ! is the total data volume sent by backbone node kl per unit time.
In this case, a non-renewable energy node starts to serve as backbone node, provided that: no adjacent renewable energy node exists around the non-renewable energy node. In other words, for the subset of non-renewable energy nodes B0=[b1, b2, b3,…,bn], if !! ! ! ! and ! ! ! !! ! ! ! ! , all members of subset B0 are candidate nonrenewable energy backbone nodes.
Considering the constant changes of cluster heads, the energy consumption is expressed as: Thus, the optimization goal of network deployment is expressed as:

Constraints
As mentioned above, the farmland WSN node deployment with optimal costlifecycle ratio must ensure good network connectivity and coverage, and achieve stable operation of renewable energy nodes in the deployment of renewable energy node.
Connectivity and coverage. Under regular deployment, a certain number of nodes are the basis of the network connectivity and coverage. When it comes to random deployment, however, another constraint is needed to prevent excessive node centralization or decentralization, which bear on network connectivity and coverage.
The following condition was proposed to guarantee good network connectivity: In this research, the network coverage of the monitoring area was evaluated by the coverage rate: the ratio of the area covered by nodes to the total area of the monitoring area. The 0-1 coverage model was adopted for the evaluation (Kalayci and U!ur, 2011).
For any point p in an area, if there are sensor nodes within the circle around p with a radius equivalent to the maximum communication radius of the sensor, node p should be considered to be covered by the sensor network. where c(p) is the coverage condition of node p. If p is not covered, c(p)=0; otherwise, c(p)=1. If the monitoring area is denoted as A, the coverage rate is expressed as: If "c is the minimum coverage required for the monitoring area, there must be "#" c .

Stability of renewable energy nodes.
Capable of continuous acquisition of energy from the environment, renewable energy nodes are generally arranged to undertake high energy consumption tasks to extend the life-cycle of the whole network. In the meantime, the energy acquisition of such nodes is unstable due to the instability of environmental energy (e.g. solar energy and wind energy). If the energy acquisition remains insufficient for a long time, the residual energy of renewable energy nodes may fall below the threshold value E thre . In this case, renewable source nodes will cease working, leading to unstable network operation. To sum up, the environmental energy, the energy acquisition and energy consumption are the major factors affecting the stable operation of renewable source nodes.
The unstable operation of renewable energy nodes has a direct effect on network connectivity and coverage. It is impossible to achieve excellent data transmission and monitoring performance or suppress the network cost if many renewable energy nodes break down at the same time. Thus, the unstable operation must be reduced in node deployment by increasing the number of such nodes.
For any renewable energy node p i , the instability factor can be obtained by the following formula: where $ 1 , $ 2 , $ 3 and $ 4 are the number of adjacent nodes, the Euclidean distance to the sink node, the mean distance to the nearest n k renewable energy node, and the density of renewable energy node in the monitoring area, respectively.
The surrounding nodes should be adjusted slightly according to their instability factors so that: where % con is the instability factor threshold of renewable energy nodes. The threshold is adjusted according to the stability of the renewable energy source in the deployment environment and the deployment density of renewable energy nodes.

Optimization model
In accordance with the objective function in Section 3.1, the optimization of node deployment attempts to maximize the network lifecycle under the constraints of the total number of nodes, connectivity, coverage, and stability of renewable energy nodes. The constrained optimization model was constructed accordingly: In reference to previous constrained optimization problems, the research problem was transformed into an unconstrained optimization problem by the penalty function method, and solved with the optimization algorithm. The penalty function method combines the objective function and constraints into an organic whole. The equivalent unconstrainted optimization problem is expressed as: where s 1 , s 2 , s 3 , and s 4 are penalty factors; n s is the number of nodes failing to obey the constraint 2.

Solution to constrained optimization model of node deployment
Theoretically, deployment plan with the optimal cost-lifecycle ratio can be obtained by solving the formula above. Nonetheless, the WSN is a largescale network composed of numerous nodes with different energy sources. What is worse, the solutions to the deployment model involve various node positions and types, and exist as high-dimensional spaces with mixed continuous and discrete data. Such a gigantic, complex system is nowhere to be solved with traditional precise mathematical approaches, which rely heavily on the certainty and accuracy of data. In contrast, intelligent optimization algorithms like particle swarm optimization (PSO), genetic algorithm (GA), tabu search (TS), and simulated annealing (SA) are excellent tools to handle such a largescale and high-dimensional optimization problem. Featuring a iJOE -Vol. 14, No. 5, 2018 simple algorithm, easy calculation, fast speed and high efficiency, the PSO does well in optimizing continuous problems, but it often falls into the trap of local optimum in dealing with discrete optimization problems. As a result, the PSO was optimized before being applied to optimize the research problem mixed with continuous and discrete factors.
The following are the symbols and expressions used in the optimization of the PSO: n p stands for the total number of particles needed; 3&n p denotes the dimensions of the vector of each particle; particle x is expressed as: [type , x , y , , type , x , y , , type , x , y ] where type j is the type of the j-th node, and x j , y j is the coordinate of the j-th node; the velocity vector of the i-th particle is expressed as: P i means the best position of the i-th particle; G i refers to the best position of all particles.
(1) Renewal function of continuous variable As a continuous variable of the particle, the coordinate changes by the PSO position function as the particle swarm evolves to each new generation.
where $ 1 , $ 2 , and $ 3 are the inertia factor, self-learning factor and social learning factor, respectively; rand 1 () and rand 2 () are two random numbers within [0,1]; v amax is the maximum velocity, v amin is minimum velocity.
(2) Iteration function of discrete variable As a discrete binary variable, the type of node in Xi cannot be iterated in the same method for continuous variable. Therefore, after determining the node position, an internal iteration was conducted for the discrete variable to obtain the optimal solution. The iteration mainly calculated the gradient variation of the discrete variable. The changing trend of nodes at positions and the variation in fitness function were computed to obtain the trend of node energy type iteration: where 'type i is the variation in fitness caused by previous iteration and the position of the node.
Discrete the iterated values: Then, type' i was taken as the iteration amount of node type for optimization.
(3) Termination condition When the fitness is no longer improved (%s&(: the accuracies of 2 successive iterations are lower than the given accuracy (), the iteration should be terminated and the corresponding iteration times should be adopted.

Algorithm simulation and performance analysis
The simulation was performed on MATLAB7.0 to verify the performance of the proposed optimized algorithm. It was assumed that the communication radius r c of the sensor node was 150m, and the simulation area was a circle with a radius of 1,000m. The other parameter values are listed in Table 1.
To solve the optimization problem, the scale of the hybrid evolutionary population was set to ! ! !" ! !! ! , the maximum iteration times of the continuous variable and the discrete variable were set to 300 and100, respectively; $ 1 =0.4, $ 2 =0.3, $ 3 =0.3, and (&10 -2 . Through the calculation of network coverage and connectivity in this research, it is concluded that the total number of network nodes should exceed N=69. After determining the minimum number of network nodes, the EHNDP was employed to calculate the minimum cost-lifecycle ratios at different network scales, and the results were compared to select the optimal network scale, node type, and node number for deployment. Figure 2 illustrates the relationship between the minimum cost-lifecyle ratio and the network cost.
As shown in the figure, the cost-lifecycle ratio first increased with the number of nodes, peaked at c=183, and then started to decrease despite the further increase in the number of nodes. This is because the renewable energy source, which prolongs network lifecycle, increases slower than the network cost. The figure shows that c=183 is the optimal deployment plan in this scenario. Therefore, the exact number of different nodes was determined: 24 renewable energy nodes and 63 non-renewable energy nodes.
After that, the 24 renewable energy node and 63 non-renewable energy nodes were deployed in the monitoring area with the EHNDP method and random deployment method, respectively. The performance of the two methods were contrasted in terms of the total utilization of renewable energy source, network lifecycle, residual energy of non-renewable energy source and stable operation of renewable energy source. Figure 3 presents the total energy distribution of each renewable energy node throughout the network lifecycle. It shows that the ENHDP enabled more renewable energy nodes to use energy than random deployment. Hence, the proposed method does improve the utilization of renewable energy nodes.     Figure 4 displays the residual energy of each non-renewable energy node after network operation. It can be seen that non-renewable energy nodes had less residual energy with the EHNDP than with random deployment, indicating that the EHNDP could enhance the utilization of non-renewable energy nodes. It also discloses that the residual energy distribution of non-renewable energy nodes is more concentrated with the EHNDP, namely, the energy of such nodes is used in a more balanced way. Figure 5 records the variation in the number of survival non-renewable energy nodes. According to the figure, the first node death occurred at 6,000s with the EHNDP, and 4,000s with the random deployment. The total node death velocity was slowed down by the EHNDP, revealing that the proposed method has prolonged network lifecycle with a lower death velocity of the nodes.
In the event of energy shortage, renewable energy nodes in the network may shut down temporarily, causing negative effect on the stable operation of the network. The renewable energy supply situation was also simulated in this experiment: the network survival time was divided into 120s-long cycles; renewable energy source was suffi-ciently supplied in the first 80s of each cycle, and terminated in the next 40s. Then, the author compared the number of failures of renewable energy nodes in 20 cycles with the EHNDP and the random deployment. The comparison is, in essence, a contrast between the stabilities of different deployment methods. Figure 6 compares the number of failures with the two different deployment methods. In the network lifecycle, the EHNDP method caused fewer node failures than the random deployment. This means the network is more stable in short energy supply.

Conclusions
With network cost-lifecycle ratio as the optimization target, this paper proposes an efficient network node deployment plan for the energy heterogeneous farmland WSN. On the premise of ensuring the coverage of monitoring network, it was considered that renewable energy nodes had more energy than non-renewable energy nodes, and energy acquisition was affected by the environment. Therefore, an energy heterogeneous WSN node deployment model was established on the basis of network connectivity and coverage. Through the optimization of the model, the author obtained the deployment method with the minimum network cost-lifecycle ratio. The method strikes a balance in energy consumption between sensor nodes, and reduces the unsta-ble operation of renewable energy nodes resulted from insufficient supply of renewable energy source in environment. In view of the nonlinear continuous and discrete variables, the improved PSO was employed to solve the optimization deployment plan. Specifically, the continuous variable of the plan was iteratively optimized, and then the discrete variable was also optimized in the process of each iteration. The simulation results demonstrate that the proposed EHNDP method performs well in optimizing network cost-lifecycle ratio, balancing the energy consumption of nonrenewable energy nodes, improving the utilization of renewable energy nodes, and increasing the network operation stability. If it is applied to energy-heterogeneous WSNs, the method is bound to achieve good network performance at a low deployment cost.