2.1. Original Virtual-Spring-Force Algorithm
Communication range and sensing range are the characteristic parameters of each sensor. In a perfect hexagon topology, equilibrium distance between two neighbor nodes should be . Therefore, communication range is usually larger than .
At the beginning of the deployment process, all N nodes in a wireless sensor network were randomly deployed in the target region whose area was S and the center was located at (0,0). The location of each sensor is given by a vector ( also indicates the position of node i at time t). Vector indicates the distance between node i and node j at time t.
The force on node
i at time
t is driven by the Newton motion law:
where
m is the mass of a sensor node, and
is the resultant force.
can be defined as the sum of three components:
where
is the virtual spring force,
is the damping force, and
is the centripetal force.
Generally, spring forces are established between pairs of sensor nodes if one node has no other nodes in the upper and lower 60 degree sectors with another node, and their distance is smaller than
. Here,
is the normalized vector from node
i to
j. If the set of possible node
j acting with virtual forces on node
i (
is expressed by
, the corresponding total spring force of node
i is
where
is the spring coefficient.
Damping force
is defined as
Damping force reduces the elastic potential energy for the whole network and accelerates the convergence of the node deployment. The upper formula is the case when a sensor node approaches a quasiequilibrium state since the node velocity . In such a case, the damping force equals to (force balance) or . Once the damping of the spring oscillator is absent, the oscillator should work in a simple harmonic vibration state; is the natural vibration frequency, and is the natural damping coefficient. The lower formula is the case during the algorithm processing. In such a case, damping force is related to node velocity and is the given damping coefficient.
Let and , where is the real vibration frequency, related to the damping effect. Usually, damping force strengthens with the increase of . New quantity is defined as . When and , the sensor network operates in a critical damping condition. Elastic potential energy decreases due to the damping force, and the system quickly converges to an equilibrium state without unnecessary vibration or energy consumption. Under this circumstance, the critical value of parameter .
Reference [
14] has already discussed the influence of damping coefficient
on the virtual-spring-force algorithm. They tried a fixed
during all deployment and also varied the
in different stages of deployment process. The results suggested that each damping condition, with its unique characteristic, could play to its strengths in different deployment stages in real applications. Therefore, in this paper, damping coefficient
is not discussed. We then followed their work and also used a dynamic damping coefficient. In time steps 0–300,
, and after 300 time steps
.
Centripetal force is defined as
which is only an external auxiliary force acting on each sensor node. With centripetal force, sensors move closer to the region center and always return to the sensor networks. The
constant must be much smaller than spring force so that it does not affect the main virtual algorithm. Once a wireless sensor network is deployed to the final hexagon topology, this force is released in the algorithm.
A second-order leapfrog scheme was utilized for the time discretization in Equation (
1), as follows:
where
and
are particle velocity and acceleration at each step, respectively. After obtaining all the position information of neighbors, the sensor node can calculate
r and
v using Equations (1) and (2). For completeness, the pseudocode of the leapfrog schema solution for VFA-SF within the wireless sensor network is shown in Algorithm 1. To prevent the description from becoming cumbersome, we omitted details that could either be inferred or implemented using standard techniques.
Algorithm 1: Distributed Algorithm for Leapfrog in Virtual Spring Force (VFA-SF) in Wireless Sensor Networks. |
|
2.2. Optimized VFA-SF Strategy
In the original VFA-SF, the self-deployment process calculates spring forces, positions, and movements for all nodes at each time step. It has a possibility with some coverage holes or twisted balance in the final deployment distribution.
The optimized VFA-SF strategy (VFA-SF-OPT) begins node redeployment from the central region since node deployment in central region is more important than that near the edge. At the early stage of deployment, external force , whose direction points to the center (0,0), is added to the most peripheral nodes of the wireless sensor network. Other sensor nodes in the external region are gradually involved to the deployment optimization.
External forces should have the following characteristics: (1) always applied to the outermost node of the sensors participating in the deployment algorithm; (2) due to the spring effect, external forces acting on the most marginal node are transmitted to the internal network; (3) similar to centripetal force, external forces should be released when network deployment is to be completed. It promotes the formation of perfect hexagon topology and effectively avoids holes or twisted balance.
The shift from global computation and deployment to centrally preferred deployment was very stable and effective. Further statistical analysis also showed that all wireless sensor networks, regardless of what the initial distribution is, finally yield perfect hexagonal topology. Optimized redeployment can work for nonstandard deployment and yield lower energy consumption than that of the original virtual-spring-force algorithm [
13].