Sensing Coverage Algorithm of Sparse Mobile Sensor Node with Trade-Off between Packet Loss Rate and Transmission Delay

. To solve the problem of sensing coverage of sparse wireless sensor networks, the movement of sensor nodes is considered and a sensing coverage algorithm of sparse mobile sensor node with trade-off between packet loss rate and transmission delay (SCA SM) is proposed. Firstly, SCA SM divides the monitoring area into several grids of same size and establishes a path planning model of multisensor nodes’ movement. Secondly, the social foraging behavior of Escherichia coli in bacterial foraging is used. A fitness function formula of sensor nodes’ moving paths is proposed. The optimal moving paths of all mobile sensor nodes which can cover the entire monitoring area are obtained through the operations of chemotaxis, replication, and migration. The simulation results show that SCA SM can fully cover the monitoring area and reduce the packet loss rate and data transmission delay in the process of data transmission. Under certain conditions, SCA SM is better than RAND D, HILBERT, and TCM.


Introduction
Wireless sensor networks (WSNs) are composed of a large number of sensor nodes and are deployed manually or randomly in a given monitoring area.The sensor node recognizes and collects the state of the monitoring environment (such as temperature, humidity, and brightness) and sends this information to devices (sink nodes or base stations) that are suitable for data processing, visualization, analysis, and decision-making [1,2].Because sensing range and energy of sensor nodes are limited, the analysis of large amounts of local data is impossible when the monitoring area is huge and the environment is complex.Moreover, large-scale deployment requires a huge cost investment.Therefore, a sparse mobile sensor network with a small number of sensor nodes is considered; in particular, a device such as a drone or robot can be used in the sensor node to move to each monitoring position.The mobile monitoring node can sense the entire monitoring area.It reduces the system application cost [3].
However, sparse mobile sensor network may generate a large packet loss rate and a long data transmission delay.Therefore, mobile path selection and sensing coverage of mobile sensor nodes need be studied.At present, some scholars focus on the path selection of mobile sensor nodes installed on UAVs (unmanned aerial vehicle) and achieve certain results.For example, a rasterized motion model is established based on the environmental information within the scope of the UAV in the literature [4], and A * algorithm is used to obtain the UAV's moving path.The literature [5] constructs the model of UAV flight path, quantitatively describes the threat area on the path, and uses improved artificial potential field method to obtain a sufficiently smooth flight path.A three-layer framework consisting of sensor layer, cluster head layer, and moving collector layer is proposed in the literature [6].The mobile collector calculates its moving 2 Wireless Communications and Mobile Computing trajectory planning, uses the divide and conquer method to determine the turning point on the path, and obtains its efficient mobile data collection scheme.In the literature [7], each mobile sensor node is assigned a unique ID to find its potential moving position.The greedy algorithm is used to select the optimal stayed position from these potential moving positions.Finally, its optimal path is constructed.The literatures [4][5][6][7] mainly implement the path of mobile sensor node from starting position to target position, but how to efficiently cover the entire monitoring area is not taken into consideration.The literature [8] uses HILBERT curve as moving path of mobile aggregation node to cover the entire network.The literature [9] proposes a temporal coverage mechanism (TCM) for mobile sensor nodes in a sparse network environment.TCM divides the monitoring area into several grids so that mobile sensor nodes can cover the entire monitoring area as quickly as possible.Meanwhile, to achieve efficient coverage of the monitoring area under the sparse WSNs, some scholars focus on using artificial intelligence algorithms to obtain the moving paths of mobile sensor nodes.For example, the literature [10] proposes an improved artificial bee colony algorithm to solve the traveling salesman problem of neighborhood search in sparse WSNs and obtains the optimal data collection and movement paths of mobile sensor nodes.The literature [11] proposes autonomous movement model of mobile sensor node, which can be solved by bacterial foraging optimization algorithm (BFOA).The autonomous mobile solution of each mobile sensor node can be obtained.However, the literatures [8][9][10][11] do not consider that the storage space of mobile sensor nodes is limited and have large packet loss rate and high data transmission delay.
Therefore, a sensing coverage algorithm of sparse mobile sensor node with trade-off between packet loss rate and transmission delay (SCA SM) is proposed.The monitoring area is divided into a finite number of square virtual grids by SCA SM.Each mobile sensor node takes neighbor grid center as next stayed position, proposes a mathematical expression of moving paths of mobile sensor nodes, and establishes a moving path planning model for multiple sensor nodes.To quickly solve the optimization model, the processes of chemotaxis, replication, and migration in the BFOA are used to solve the model.In accordance with the optimization goal of the WSNs, fitness function is proposed to reduce the packet loss rate and data transmission delay as much as possible.Mobile sensor node simulates two basic actions of Escherichia coli, such as advancement and flipping in the search space.The mobile sensor node first moves a step in any random direction.If the fitness value of current moving path in this direction is improved compared with that value of previous moving path, then it will continue to advance in this direction.Instead, it will flip to find a new random direction and a position that can improve the fitness value.When all mobile sensor nodes cover the entire monitoring area or reach the end condition, SCA SM outputs an optimal solution.Therefore, optimal moving paths of all mobile sensor nodes which cover the entire monitoring area are obtained, and the packet loss rate and data transmission delay in data transmission process are reduced.

Algorithm Assumptions and Basic Principles
In SCA SM, WSNs are assumed to be evenly distributed in the monitoring area of two dimensions.As shown in Figure 1, the monitoring area is divided into square grids of uniform size, and some mobile sensor nodes are randomly placed in the monitoring area.When the network is running, all mobile sensor nodes move to the neighbor grid center's positions which are not stayed before and sense the data of grid area.If a mobile sensor node is within the communication range of sink node, then the data are sent to sink node in single-hop manner; otherwise, the data are stored in the mobile sensor node.If storage space of mobile sensor node is full, the oldest data are deleted, and the received data are stored.However, SCA SM still needs to solve the following two problems.The first is how to establish an optimization model of multisensor nodes' mobile sensing coverage through mathematical model.The second is how to use the improved bacterial foraging algorithm to solve the optimization model and obtain optimal moving path scheme of multiple mobile sensor nodes that can fully cover the monitoring area.The specific solutions to these two problems are as follows.

Establishment of the Optimization Model
where   represents the moving path of mobile sensor node .   represents the th stayed grid center's position of mobile sensor node .   represents the amount of data stored in the mobile sensor node  at time . max represents the maximum storage space of mobile sensor node.  represents the distance from mobile sensor node  to sink node. max represents the maximum communication radius of sink node.  +1 represents the amount of data received and sensed by mobile sensor node  at the next moment.   represents the total number of lost packets of mobile sensor node  from network start time to time .V  represents the sensing coverage of mobile sensor node , that is, the ratio of the number of grid center positions in the moving path of mobile sensor node  and the total number of grids.  represents the packet loss rate.  represents the total number of packets generated by all mobile sensor nodes. V represents the current data transmission delay.  represents the time when the packet  is successfully sent to sink node.  represents the generation time of packet .  represents the generation time of packet  stored in mobile sensor node or discarded.  represents the total number of packets generated by mobile sensor nodes after time .  represents the threshold of data transmission delay. 1 represents the weight factor of packet loss rate. 2 represents the weight factor of data transmission delay.
Equation ( 1) represents the objective function of optimization model, namely, minimizing the packet loss rate and data transmission delay.Formula (1a) represents that the moving path of mobile sensor node k is composed positions of grid centers.Formula (1b) represents that each mobile sensor node does not repeat through the same grid center during one round of movement.Formula (1c) represents that when mobile sensor node  is within the communication range of sink node, the data are directly sent to sink node; otherwise, the data are stored in the cache space.If the cache space is full, then the oldest data will be discarded.Formula (1d) represents an updated calculation formula for the total number of lost packets of mobile sensor node.Formula (1e) represents that the moving paths of all mobile sensor nodes contain all grid centers; namely, the sensing coverage equals 1. Formula (1f) is a formula for calculating the packet loss rate.Formula (1g) is a formula for calculating the data transmission delay.

Algorithm Solving
BFOA is a distributed parallel and random global optimization algorithm that is widely used in image processing, machine learning, pattern recognition, workshop scheduling, and other fields [12].BFOA simulates the foraging behavior of Escherichia coli in human intestines and seeks optimal population through four operations: chemotaxis, aggregation, replication, and migration.The solving process for the optimal moving paths of mobile sensor nodes is the process of Escherichia coli searching for the area of abundant food.However, the solution of bacterial fitness value needs to be solved and BFOA needs to be improved in the solution process.Therefore, each bacterium is moving paths of all mobile sensor nodes which sense and cover the entire monitoring area.(  ,   , , ) represents the data sensed by mobile sensor node  on the grid (  ,   ) at time .  represents the length of current moving path of mobile sensor node.  represents the number of grids that mobile sensor node has not passed.V  represents the sum of coverage of all mobile sensor nodes.  represents the total number of mobile sensor nodes. represents the size of bacterial population.  ,   , and   represent the number of migration, replication, and chemotaxis, respectively.  represents the probability of migration.  represents the number of mobile sensor nodes.(, , ℎ, ) represents fitness value of bacterium  at the th chemotaxis, ℎth replicas and lth migration.   represents the neighbor grid set of mobile sensor node  in the bacterium .  = {  1 ,   2 ,   3 , ...,    } represents the movement scheme of current bacterium  after migration, and it is initially an empty set.   represents the moving path of mobile sensor node  in the bacterium .The specific content of the model solution is as follows.

Calculation of Bacterial Fitness Value.
Because the setting of bacterial fitness value affects the solution of optimization model ( 1), the chemotaxis operation leads the bacteria to preferentially move to a nutrient-rich environment.But if the fitness value of the bacterium i is directly calculated by model ( 1), mobile sensor node can easily preferentially move to the grid within the communication range of sink node.It results in a large packet loss rate and data transmission delay.Therefore, different fitness value formulas are adopted in the actual path finding process and after the path is searched.The specific implementation steps of bacterial fitness value calculation are as follows.
Step 1. Initialize the parameters and the storage space of all mobile sensor nodes.Initialize the storage space of sink node.=1, =1.
Step 2. At the current time , the data of mobile sensor node  at the position (  ,   ) are sensed, stored, and recorded as (  ,   , ).The data storage amount   +1 at next moment according to formula (1c) is updated.If the data storage amount   +1 at next moment is greater than maximum storage space  max , then the oldest data are deleted.According to formula (1d), the deleted data are recorded in the number of lost packets, and the number of lost packets is updated.
Step 3 (=+1).Mobile sensor node  moves to next stayed position.If mobile sensor node  is within the single-hop range of sink node, all data in the storage space are directly sent to sink node.The data received by sink node are recorded, and the data storage capacity is updated.Then whether a neighbor mobile sensor node exists is determined.If it exists, then it communicates with the neighbor mobile sensor node, obtains coverage rate of the neighbor sensor node, and calculates the sum V  of sensing coverage of the known mobile sensor nodes.
Step 5.If V  =1, then packet loss rate   is calculated by formula (1f).Skip to Step 7; otherwise, the mobile sensor node is still looking for the path.The number   of grids in the single-hop communication range of sink node is calculated.The number   of discarded packets is calculated by formula (2).
where   represents the number of grids which is not passed before.  represents the sum of data stored by all mobile sensor nodes.
Step 6.When   ≤ 0, the grids in the single-hop communication range of sink node is allocated reasonably, and the other grids do not generate the number of lost packets,   = 0. Otherwise,   is recorded in the number of lost packets, and the packet loss rate    is calculated by formula (3) on the basis of received data packets of sink node and the number of lost packets stored in mobile sensor nodes.
where   represents number of lost packets of mobile sensor node at previous moment and   represents total number of packets generated by all mobile sensor nodes.
Step 7. The estimate value  V of data transmission delay is calculated by formula (1g), and the fitness values of all bacteria are calculated by formula (4).
where packet loss rate   is (5)

Chemotaxis of Bacteria.
Mobile sensor node simulates two basic actions of Escherichia coli, such as advancement and flipping in the path planning process.First, each mobile sensor node in a bacterium moves a step in any random direction.If the fitness value of current moving path in this direction is improved compared with the fitness value of previous moving path, then it will continue to advance in this direction.Otherwise, it will flip to find a new random direction and a position that can improve the fitness value.
If neighbor grid has been accessed, the mobile sensor node is easy to fall into dead end.At this time, the nearest grid should be selected to meet the constraint condition (1b), thereby achieving the chemotaxis operation.As shown in Figure 2, the specific implementation steps are as follows.
obtain all current bacterial information and replication parameter h, let g = 1, i = 1, k = 1 calculate the fitness value J(i, g, h, l) of bacterium i Update the sensing coverage.Mobile sensor node k communicates with neighbor mobile sensor nodes within a single hop range, and calculate the sum of sensing coverage of known mobile sensor nodes.Step Step 5.If (,  + 1, ℎ, ) ≤ (, , ℎ, ), it indicates that the bacteria are closer to optimal solution, so skip to Step 6.Otherwise, if fitness value is not improved, then judge whether the set    is an empty set.If it is, skip to Step 6; otherwise, skip to Step 4 and reselect the random direction for chemotaxis.

Improved BFOA.
As shown in Figure 3, SCA SM calculates bacterial fitness value through formula (4) and uses chemotaxis, replication, and migration of improved bacterial foraging algorithm to solve the model (1).The specific implementation steps are as follows.
Step 1. Initialize the bacterial population and algorithm parameters: the initial positions of all mobile sensor nodes in bacteria are randomly generated, and neighbor grid set is updated.Let   be infinite, =1, ℎ=1, =1, =1, =1.
Step 2. Use chemotaxis to obtain moving paths of mobile sensor nodes in all bacteria.
Step 3. Calculate the fitness values of  bacteria in the population and arrange them in ascending order.Remove half of the bacteria with high fitness value and copy half of the bacteria with small fitness value.ℎ=ℎ+1.If ℎ ≤   , =1, =1, then skip to Step 2; otherwise, skip to next step.
Step 4. Select the moving paths and fitness value of the bacterium with smallest fitness value   .If   <   ,   =   , then the moving paths of mobile sensor nodes in the bacterium are the optimal moving paths.Otherwise, the bacterium is eliminated and the optimal moving paths of mobile sensor nodes are replicated to the bacterium.
Step 5. Calculate the adaptive probabilities    of all  bacteria via formula (6).
where   represents the fitness function and   represents the migration probability.
Step 6. Generate a random number between 0 and 1.If the adaptive probability    is greater than the random number, initial positions of   mobile sensor nodes are randomly generated as current grid positions and current moving paths in the bacterium .Let the set   be an empty set; otherwise, the moving paths of bacterium  are saved in set   .
Step 7 (=+1).If  ≤   , then skip to Step 2; otherwise, output the optimal moving paths of all mobile sensor nodes and end the algorithm.

Simulation Parameter Selection.
To verify the algorithm performance, the simulation experiment is performed and SCA SM is compared with RAND D, HILBERT [8], and TCM [9].Assume that the 200 m * 200 m monitoring area is divided into several virtual square grids.The sink node is in the center of the monitoring area.The positions of mobile sensor nodes are random, and the communication radius of each nodes is 50 m.In the simulation, the main parameters are set to the following values.The maximum storage space  max is 6 kbit.The amount of data received and sensed by the node in each uncovered grid is 2 kbit.The threshold   of data transmission delay is 10 2 .The weight factor  1 of packet loss rate and weight factor  2 of data transmission delay are 0.5.The chemotaxis number   is 10; the replication number   is 20.The migration number   is 50.The migration probability   is 0.6.The number of bacteria  is 50 when square grid number is less than or equal to 150, and the number of bacteria  is 100 when square grid number is greater than 150.

Analysis of Simulation Results
. Because multiple mobile sensor nodes are considered and randomly placed within the monitoring area, initial positions of mobile sensor nodes are randomly generated.To illustrate the effectiveness of the algorithms, random initial positions with (25, 25), (25, 175), and (175, 175) are selected, and the number of mobile sensor nodes is 2, 3, and 4. Then the parameters in Section 4.1 are selected and Figures 4-7 are obtained.As shown in Figure 4, all mobile sensor nodes in RAND D randomly select the closest grid which is not stayed before as next stayed position.As shown in Figure 5, the number of stayed positions of HILBERT is a power of 4, and each mobile sensor node moves following HILBERT path until the entire monitoring area is covered.As shown in Figure 6, each mobile sensor node in Use chemotaxis to obtain moving paths of mobile sensor nodes in all bacteria.
Calculate the fitness values of S bacteria in the population and arrange them in ascending order.Remove half of the bacteria with high fitness value and copy half of the bacteria with small fitness value, h = h + 1.
Output the optimal moving path of all mobile sensing nodes and end the algorithm.
The bacterium is eliminated and optimal moving path is replicated to the bacterium.
Initialize the bacterial population and let F best be infinite, S i is an empty set, ℎ = 1 Select the moving path and fitness value of the bacterium with smallest fitness value Then the moving paths of mobile sensor nodes in the bacterium are the optimal moving paths.
F best = F local bacteria via Formula (6).
Calculate the adaptive probabilitiesP i self of S Generate a random number between 0 and 1.If the adaptive probability is greater than the random number, then initial positions of all mobile sensing nodes are randomly generated as current grid positions and current moving paths in the bacteria moving paths of bacterium i are saved in set, l = l + 1 i.Let the set S i be an empty set; otherwise, the l ≤ N ed ?ℎ ≤ N re ?TCM follows the shortest moving path in the literature [10] which fully covers the monitoring area.As shown in Figure 7, no matter the number of mobile sensor nodes, SCA SM can establish a path planning model of multisensor nodes' movement, calculate bacterial fitness value of each bacterium, solve the optimization model (1) by improving the bacterial foraging algorithm, and obtain optimal moving paths.Every mobile sensor node passes through several grids and moves to the vicinity of sink node to send data.Then SCA SM reduces the packet loss rate and data transmission delay.
The bacterial population completes chemotaxis operation and replication operation of all mobile sensor nodes, then it implements and completes a migration operation.After each migration operation, mobile sensor nodes have their current optimal moving paths with different steps.The fitness value of optimal moving paths is current optimal fitness value.As shown in Figure 8, the abscissa represents the number of migrations, and the ordinate represents the optimal fitness value.The fitness value of SCA SM decreases almost vertically after previous migration.After five migrations, the fitness value of optimal moving path drops to a lower value.As migration operation can help the algorithm jump out of local optimum and improve the convergence accuracy, the fitness value converges to 0.13424 after about 16 migrations.This fitness value is the optimal solution of optimization model (1).Therefore, SCA SM is convergent.
Simulation Results for Different Maximum Storage Spaces.In the section, the parameters in Section 5.As shown in Figure 9, in RAND, although maximum storage space of the node is increased, mobile sensor node randomly selects moving path.It leads that some moving paths are away from sink node and improves the packet loss rate.Therefore, packet loss rate of RAND fluctuates with the increase in the maximum storage space.Packet loss rates of HILBERT, TCM, and SCA SM decrease with the increase in the maximum storage space.Especially, packet loss rate of SCA SM decreases faster.Because HILBERT and TCM do not consider the data loss problem when storage space is full, packet loss rates of HILBERT and TCM are larger than that of SCA SM.The SCA SM uses bacterial foraging algorithm to solve the optimization model ( 1) and finds moving paths that weigh packet loss rate and data transmission delay through multiple migrations.In the moving path selection, when the storage space is almost full, the node moves to the communication range of sink node as much as possible, sends the stored data to sink node, and continues to perform mobile coverage.It can reduce the packet loss rate.In summary, when maximum storage space increases, packet loss rate of SCA SM is always lower than that of RAND D, HILBERT, and TCM.When maximum storage space reaches 34 kbit, the packet loss rate is close to 0%.As shown in Figure 10, RAND D has randomness, and data transmission delays of HILBERT and TCM decrease with the increase in the maximum storage space.However, they do not consider the data transmission delay in the moving path selection.SCA SM establishes an optimization model, which is solved by improved bacterial foraging algorithm, and obtains the optimal moving path of each mobile sensor node which is through the grid centers in the communication range of sink node.When mobile sensor node moves along its optimal path, it can send its own data to sink node in time.Therefore, the data transmission delay of SCA SM is always lower than the data transmission delays of RAND D, HILBERT, and TCM.  a long moving path; therefore, its packet loss rate and data transmission delay are relatively large.The number of stayed grid of HILBERT must be a power of 4, so only the monitoring areas 1, 4, and 5 are valid and the moving path of each mobile sensor node is fixed.Its perceptual coverage problem of mobile sensor node is not considered.TCM only covers the entire monitoring area as short as possible and does not consider the packet loss rate and data transmission delay as HILBERT.SCA SM establishes a reasonable optimization model and fitness function due to comprehensive consideration of packet loss rate and data transmission delay.Moreover, it uses improved bacterial foraging algorithm to obtain the optimal moving paths of all mobile sensor nodes.The moving optimal paths can maintain low packet loss rate and data transmission delay, and it is significantly better than RAND D, HILBERT, and TCM.

Conclusion
A sensing coverage algorithm of sparse mobile sensor node with trade-off between packet loss rate and transmission delay (SCA SM) is proposed in this paper.First, the algorithm assumptions and basic principles are proposed.Second, path selection constraint, data capacity update, packet loss rate, data transmission delay, and other related parameters and conditions are considered.An optimization model for fully covering the monitoring area and balancing the packet loss rate and data transmission delay is established.Bacterial fitness value calculation, bacterial chemotaxis operation, and improved bacterial foraging algorithm are proposed to solve the optimization model.Optimal moving paths of multiple mobile sensor nodes are obtained.Finally, simulation parameters of the algorithm are given.The simulation results show that the SCA SM algorithm can find the optimal moving path of multiple mobile sensor nodes, has low data packet loss rate and data transmission delay, and is superior to RAND D, HILBERT, and TCM.However, the algorithmic complexity of SCA SM is relatively high.Therefore, the next goal is to study the optimization model and heuristic method of each mobile sensor node to solve the optimization model based on local information.Then optimization solution of each mobile sensor node is obtained, and it reduces the complexity of the algorithm.

Figure 3 :
Figure 3: Flow chart of SCA SM algorithm.
2. Calculate the fitness value (, , ℎ, ) of the bacterium .It is judged whether the set   is an empty set.If it is an empty set, then skip to Step 3. Otherwise, let    =  + 1 +   (ℎ − 1).Select the    th stayed grid in the set    .Let it be the next grid of mobile sensor node .Add it to current moving path, and obtain the new moving path.Skip to Step 6. Update the sensing coverage V  , and mobile sensor node  communicates with neighbor mobile sensor nodes in the single-hop range to calculate the sum V  of sensing coverage of known mobile sensor nodes.If V  is 1, then skip to Step 6; otherwise, skip to Step 4. Step 4. Update the neighbor grid set    , and determine whether the set    is an empty set.If it is, add current closest gird to the grid set    ; otherwise, neighbor grid set    is not updated.Randomly select a grid in the set    as the flip direction, delete the grid in the set    , add the next stayed grid to moving path, and calculate the fitness value (,  + 1, ℎ, ) of the new moving path.