3D Wireless Sensor Network (WSN) Coverage Optimization Based on Sparrow Search Algorithm
Abstract: This article mainly discusses how to use the Sparrow Search Algorithm for optimizing coverage in 3D Wireless Sensor Networks (WSN).
1. Wireless Sensor Network Node Model
This article is primarily based on the 0/1 model for optimization. In a two-dimensional plane, the sensing range of a sensor node is a circular area centered at the node with a radius of , which is commonly referred to as the “sensing disk” of the node. The radius is known as the sensing radius of the sensor node, which is related to the physical characteristics of the built-in sensor. Assuming the position coordinates of the node are , in the 0-1 sensing model, for any point on the plane, the probability of the node detecting an event occurring at point is: where is the Euclidean distance between the point and the node.
2. Coverage Mathematical Model and Analysis
Now assume the target monitoring area is a two-dimensional plane, with the number of identical structure sensor nodes deployed in the area being N. Each node’s position coordinates are assumed to be initialized, and the sensing radius is r. The set of sensor nodes is represented as: where represents a sphere centered at node with a monitoring radius r. It is assumed that the monitoring area is discretized into spatial points, with coordinates . The distance between the target point and the sensor node is: The event defined as the point in the target area being covered by the sensor node is . The probability of this event occurring is the probability that point is covered by sensor node : We define the coverage rate of all sensor nodes in the target monitoring environment as the ratio of the covered area of the sensor node set to the area of the monitoring region, as shown in the formula: Our ultimate goal is to find a set of nodes that maximizes the coverage rate.
3. Sparrow Search Algorithm
For the specific principles of the Sparrow Search Algorithm, please refer to: https://blog.csdn.net/u011835903/article/details/108830958. The Sparrow Search Algorithm is used to find the minimum value. Therefore, the fitness function is defined as minimizing the uncovered rate, which maximizes the coverage rate. As follows:
4. Experimental Parameter Settings
The parameter settings for wireless sensor coverage are as follows:
%% Set WSN coverage parameters,
%% Default input parameters are integers. If you want to define decimals, please multiply by a coefficient to convert to integers before conversion.
%% For example, for a range of 1*1, R=0.03 can be converted to 100*100, R=3;
% The area range is AreaX*AreaY*AreaZ
AreaX = 100;
AreaY = 100;
AreaZ = 100;
N = 20 ;% Number of coverage nodes
R = 15;% Communication radius
The parameters for the Sparrow Search Algorithm are as follows:
%% Set Sparrow optimization parameters
pop=30; % Population size
Max_iteration=30; % Set maximum number of iterations
lb = ones(1,3*N);
ub = [AreaX.*ones(1,N),AreaY.*ones(1,N),AreaZ.*ones(1,N)];
dim = 3*N;% Dimension is 3N, N coordinate points
5. Algorithm Results


From the results, the coverage rate continuously increases during the optimization process. This indicates that the Sparrow Search Algorithm plays an optimizing role in coverage optimization.
6. References
[1] Shi Chaoya. Research on Wireless Sensor Network Coverage Optimization Based on PSO Algorithm [D]. Nanjing University of Science and Technology.
7. MATLAB Code
Click “Read the original text” to obtain!