Sensor Node Deployment Based on Electromagnetism-Like Algorithm in Mobile Wireless Sensor Networks

The dynamic deployment of sensors in wireless networks significantly affects the performance of the network. However, the efficient application of dynamic deployments which determines the positions of the sensors within the network increases the coverage area of the network. As a result of this, dynamic deployment increases the efficiency of the wireless sensor networks (WSNs). In this paper, dynamic deployment was applied to WSNs which consist of mobile sensors by aiming at increasing the coverage area of the network with electromagnetism-like (EM) algorithm which is a population-based optimization algorithm. A new approach has been improved in calculating the coverage rate of the sensors by using binary detection model so as to carry out the dynamic deployments of sensors and it has been thought to reach realistic results efficiently. Simulation results have shown that the EM algorithm can be preferred in the dynamic deployment of mobile sensors within the wireless networks.


Introduction
WSNs use the sensors working independently from each other within the coverage area to monitor the physical or environmental conditions like temperature, humidity, light, sound, pressure, contamination, noise level, vibration, object movement in different locations, and so forth, cooperatively.WSNs consist of hundreds and even thousands sensor nodes which are connected and transfer information to each other through a wireless environment.Because of the WSNs used in many applications today, to form an efficient coverage area by using positions of the sensors within the area of interest is very important.To form an efficient coverage area depends on the best application of dynamic deployments of the sensors.Sensors are within the area either as mobile or stationary.If the sensors are mobile, they can change their own positions by using the information of other positions.However, as a result of this mobility, the coverage rate of the sensors can be increased.But if the sensors are stationary within the area, they cannot have the opportunity to change their own positions.
In dynamic deployment problem, the sensors are firstly placed within the area randomly.However, an efficient coverage area cannot be formed with this placement method.To overcome this problem, different dynamic deployment algorithms have been studied by researchers [1,2].Since optimization algorithms gave quite good results in the dynamic distribution of WSNs, many researchers have applied the dynamic distribution algorithms [3][4][5] which they developed to WSNs.One of the other important approaches which is studied by the researchers to improve the coverage area of the network is the virtual force (VF) algorithm [6].VF algorithm has given positive results in WSNs that consist of mobile sensors [7,8].
Ahmed et al. [9] have discussed the existing coverage problem which is provided by the nondeterministic deployment of stationary sensors and then they have expanded the coverage area by using the mobile sensors.
Blackboard mechanism-based ant colony theory [10] which is a novel bionic swarm intelligence algorithm has been applied to the dynamic deployment problems of mobile sensor networks.
Particle swarm optimization (PSO) [11], which uses stochastic search method, is a population-based optimization algorithm which was developed, being inspired by the social behaviours of birds and fish.Kukunuru et al. [12] suggested 2 International Journal of Distributed Sensor Networks the distribution strategy which uses PSO as a base, for the purpose of expanding the coverage area of the network by decreasing the distance among neighbour nodes.Wang et al. [13] have proposed a deployment strategy based on parallel particle pack optimization (PPPO) by using both mobile and stationary sensors so as to form an efficient coverage area.They [14] then have proposed an algorithm named virtual force coevolutionary particle swarm optimization (VFCPSO) which consists of the combination of a coevolutionary particle swarm optimization (CPSO) and VF algorithm so as to improve the performance of dynamic deployment optimization.VFCPSO algorithm has been applied to networks of mobile and stationary sensors.X. Wang and S. Wang [15] have extended the basic VFCPSO to distributed VFCPSO, heterogeneous hierarchical VFCPSO, and homogeneous hierarchical VFCPSO (homo-H-VFCPSO) to improve the performance of VFCPSO algorithm.Homo-H-VFCPSO algorithm was obtained by simulation results better than the other VFCPSO algorithms.Li and Lei [16] have proposed a method of PSO which is developed for the deployment problem of WSNs consisting of mobile and stationary sensors.
Karaboga and Basturk [17] have developed the artificial bee colony (ABC) algorithm as a new intelligent optimization technique, being inspired by intelligent behaviours of honeybees foraging process, and its improved versions [18][19][20] have been suggested by most researchers who had updated it.Öztürk et al. [21] have proposed ABC algorithm as a new approach related to the dynamic deployment problem within WSN consisting of only mobile sensors.This approach which takes the basis of the ABC algorithm is for a better coverage area providing the movement of the sensors in two-dimensional space within the network.Also, the ABC algorithm [22] was applied to mobile and stationary sensors for more efficient dynamic deployment.
In this study, a new approach to the dynamic deployment problem of WSNs is proposed.The reason for using this approach is that it is more efficient in performing the dynamic deployment of mobile sensors within the wireless network.This approach which is applied to the only mobile sensors by aiming at expanding the coverage area of the WSNs is based on the EM algorithm [23] which is a population-based optimization algorithm.This approach which is being used in order to provide an optimization of WSNs finds a solution for the maximization problem of the dynamic deployment within the WSNs.Also, an EM based on a novel sensor distribution algorithm has been improved.The performance of this algorithm which is improved by us is evaluated in comparison with 2 population-based algorithms, such as the ABC and PSO.
The draft version of this paper which is being expressed dynamic deployment of WSNs with EM algorithm presented in our previous study [24] which consists of only mobile sensors.The paper is organized as follows.Section 2 introduces the metaheuristic EM algorithm.Section 3 explains the dynamic deployment problem in WSNs and sensor detection model which is used in this paper.A novel sensor deployment algorithm based on EM as the proposed algorithm approach and suggested coverage rate calculation for this problem is presented in Section 4. Section 5 presents simulation results and comparison of the sensor deployment algorithms based on PSO and ABC.Finally, we concluded the paper in Section 6 and discussed the future path of our work.

EM Algorithm
In this section, a short description of the metaheuristic EM algorithm will be given, which has been developed by Birbil and Fang [23] and is a new global optimization method.
EM algorithm is a population-based algorithm that imitates an attraction-repulsion mechanism between the charged particles in the electromagnetic field.This method has been designed for optimization of limited variables and real valued problems.Every particle in the EM algorithm represents a solution and carries a certain amount of charges in proportion with solution quality.Every particle applies an attraction and repulsion forces to the members of the population and the force appearing on only one particle is the total force and this force is used to update the location of the particle.In this direction, the main point of the EM algorithm is to carry the particles toward the solution by applying attraction and repulsion forces.In addition to this, every particle in the population is affected by other particles.
This algorithm also works on one of the sample loci of the population.Every sample point behaves as a charged particle.In order to determine the charge of a point, the objective function value of the point is used.As it can be observed from Figure 1 [23], this charge fundamentally determines the power of attraction and repulsion of the point on the population.
This algorithm is applied to the optimization problems with the limited variables as follows: where  is the dimension of the solution space,   is the upper limit of the solution space, ℓ  is the lower limit of the solution space, and () is function which will be minimized.The metaheuristic EM algorithm consists of 4 procedures which are named initialize, local search, calculation, and movement.
The pseudocode of the metaheuristic EM algorithm is provided in Algorithm 1.
Procedure 1: "Initialize." In order to optimize a problem, some parameters must be set before it is benefiting from the EM algorithm.Most basic parameters are population size, the number of iterations, and dimension of the solution space.At the same time, the initializing of the population has been done in this procedure.Distribution of the  sample points is performed randomly in the solution space.Each coordinate of a point is assumed to be uniformly distributed between upper limit and lower limit of the solution space [23].
The pseudocode of the randomly generated population is provided in Algorithm 2.
Procedure 2: "Local Search." This procedure is used to get related information for each sample point in the solution space.In this procedure, point  representing a new available point moves across the sample point  line with random step length between 0 and 1.If point  finds a more ideal point during the iterations, sample point  will be replaced with the new obtained point .Thus, the best sample point is updated.In fact, local search is not necessary and can be ignored because it generally spends more time.
Procedure 3: "Charge and Total Force Calculation".The total force on each particle is calculated according to Coulomb law.At the same time, the charge of every particle determines the attraction and repulsion forces of the particle.According to electromagnetism theory, the force applied to a particle by another particle is inversely proportional to the square of distance between these particles and is directly proportional with their own charges.
The charge of particle ,   , is calculated by the following equation: where  is the dimension of the solution space,  is the particle number, (  ) is the objective function value of particle , and ( best ) is the best objective function value (arg min{(  ), ∀}) among these particle values.The particle which has the best objective function value is named "optimum particle." Because of the objective function value of this particle which has the smallest objective function value among the particles, the charged value of this particle will be 1 which is the maximum charge value.The pseudocode of the calculating charges is provided in Algorithm 3.
After the calculation of the charge value of each particle in the solution space, the total force of the particle ,   , is calculated with the help of the formula given as follows: Calculated force   is the total force of the forces which are applied to particle  and at the same time can be referred to as the resultant force.In (3), if (  ) < (  ), the attraction force is applied on particle   by particle   and the direction of the force is from   to   .If (  ) ≥ (  ) the repulsion force is applied on particle   by particle   and the direction of the force is from   to   .The pseudocode of the calculating exerted total force is provided in Algorithm 4.
Thus, each particle in the solution space moves in the direction of the resultant force vector of attraction or repulsion forces applied to it as shown in Figure 2.
Procedure 4: "Movement towards the Total Force." After the total force   is calculated, particle  is moved to its new position which is obtained as where the random step length, , is assumed to be uniformly distributed between 0 and 1 (0 <  ≤ 1).According to (4), if   > 0 the particle moves toward the upper bound; else the particle moves toward the lower bound.On the other hand, International Journal of Distributed Sensor Networks (1)

) end for
Algorithm 3: Calculation of the charges of each particle. ( end if (9) end if (10) end for (11) end for Algorithm 4: Calculation of the total force exerted to particles. best is the optimum particle, and thus it attracts the other particles and hence its location does not change.
The new location of the particle  is determined on condition that it moves between defined upper and lower bounds of the solution space by using (1).
The pseudocode of the calculating movement of each point is provided in Algorithm 5.

Dynamic Deployment Problem in WSNs and Sensor Detection Model
Dynamic deployment of the sensors in the network is one of the most important issues which have effects on the WSNs performance.Improvement of the WSNs performances with the help of increasing the capacities of sensor detection is related to the dynamic determination of their locations within the area.The location changes of the sensors which are nondynamic in the network cause the problem of dynamic deployment.For this reason, optimizing the dynamic deployment of sensors effectively increases coverage area of the network and improves performance of the WSNs.
The initial deployments of the sensors are chosen randomly because the sensors do not have any information about the detection area and then the deployments of them which determine their next location is made dynamically.In detection area, every sensor knows its own location information and they share their information with their neighbor sensors.Sensors in this area can communicate with the neighbor sensors in the communication range and mobile sensors can change their location by using this information.However, stationary sensors cannot change their first locations in the solution space [25].
In order to find the effective coverage area of WSNs, two sensor detection models are used.These models are the binary detection model and the probabilistic detection model.In this study, we used the binary detection model.It is assumed that every sensor has the same detection range  and sensor ,   , is positioned at pixel point (  ,   ) in the solution space. (1) end if (10) end for (11) end if (12) end for Algorithm 5: Calculation of the new position of particles.
The binary detection model [26] is calculated as follows: where (  , ) is the Euclidean distance between   and  which is any pixel point in coordinates (, ) in the solution space.  (  ) is the coverage binary value of any pixel point  by the sensor   .It means that if (  , ) < , the pixel point  is covered by sensor of   .

Dynamic Deployment of WSN with EM Algorithm
In this study, EM algorithm was used to find a solution to the dynamic deployment problem of WSNs.The reason is that EM algorithm is used to maximize the coverage rate of the sensor network.While the sensor deployment algorithm based on EM is being applied to sensor networks, the following network scenarios are considered.
(i) Detection radius  of all the sensors is the same.
(ii) All of the sensors have the ability to communicate with the others.
(iii) Sensors are mobile.
where   is the coverage value of sensor ,  is the set of sensors, and  is the total size of the area of interest.Thus, the total coverage rate of the network, CR, is calculated with the help of dividing combination of coverage of the each sensor in the solution space to total size of the area.In our model, each intersection of horizontal and vertical grid lines in the solution space represents a pixel point .Coverage map which shows the coverage area of each sensor in the solution space is formed by pixel point matrices.Related values of this matrix, 0 and 1, represent the coverage situation of each pixel point .If the matrix value is 1, it means that pixel point is covered by the sensor; else it means that the pixel point is not covered.In Figure 3 [29], a graphical representation of coverage map which is generated by using the pixel points is shown.
In our recommended model, total area of the coverage map is calculated such that where   is the column number of matrices,   is the row number of matrices,   is the unit length of  coordinate in the solution space,   is the unit length of  coordinate in the solution space, and  is the total number of pixel points which represents the total area of the coverage map.In this study, dimension of the solution space equals 2 and upper   and lower   limit of the solution space coordinate values are (50, 50) and (−50, −50), respectively.Total area of International Journal of Distributed Sensor Networks (1)  ← 1 { ∈ }, V (  ) ← 0 (2) for  =  +1 to  +1 do (3) for  =   to   do (4) ← [, ] (5) for  = 1 to  do (6) for  = 1 to  do (7) if  ̸ =  then (8) if (  , ) ≤  and (  ,   ) ≤   then (9)   () ← 1 {pixel point P is covered} (10) V (  ) ← V (  ) + 1 (11) else (12)   () ← 0 {pixel point P is uncovered} (13) end if (14) end if (15) end for (16) end for (17) end for (18)  coverage map  can be found by applying these coordinate values to (7).When it is calculated that   is 100 units and   is 100 units according to the defined coordinate values using (7), it is calculated that   value is 101 units and   value is 101 units.At the same time,  which shows both the total area of the sensor network and the total number of the pixel points in the coverage map is calculated as 10201.
In this study, the binary detection model of mobile wireless sensor network was calculated by using where   () is the binary value which shows the coverage of each pixel point  by sensors within the area of interest and   is a communication range which defines communication between the sensors.If the Euclidean distance between each pixel point  in the (, ) coordinate of the solution space and sensor   is smaller than the detection radius of sensor , pixel point  may uncover by the sensor   .At the same time, it is controlled whether the sensor   which covers the pixel point  is the neighbor with at least one sensor   .Because, pixel point of  being covered only by the sensor   is not an enough condition.If it is found that sensor   is not a neighbor to any sensor   in the communication range, there will be no communication between sensor   and any other sensor in the sensor area and thus there will not be information to transmit.If the calculated binary value equals 1, the pixel point  is covered by the sensor   .If this value equals 0, the pixel point  is uncovered by the sensor   .
In our model, coverage rate (CR) was calculated by the equation where ∑   () is the total number of covered pixel points which has complied with the conditions in (8),  is the set of sensors, and  is the total area of the coverage map which is calculated by (7).
The pseudocode of the calculating of recommended coverage rate is provided in Algorithm 6.

Optimal Sensor Detection Algorithm Based on EM Algorithm.
Based on EM algorithm, optimal sensor detection algorithm has been developed in order to carry out dynamic distribution of the sensors within the area more effectively.The aim of the algorithm is to determine whether any sensor is in optimal location by taking the updated locations of sensors within the area as base, after applying EM algorithm on the sensors with random initial distribution.In this phase, at first, the Euclidean distances of a sensor from the other sensors in the area are compared with the predefined distance parameters.These parameters are OPT LOWERBOUND DIST (optimal lower bound distance) and OPT UPPERBOUND DIST (optimal upper bound distance) which are the first conditions for any sensor to be optimal and which control the lower and upper bounds of the predefined optimal neighbouring distance and MAX CONVERGENCE DIST (maximum convergence distance) which is the second condition for being optimal and which controls the maximum convergence distance of only optimal sensors to any sensor.The number of neighbour sensors which are converge to each sensor in the area and become optimal is calculated grounding on these distance parameters predefined.The number of sensors which converge to any sensor by the distance defined via the OPT LOWERBOUND DIST and OPT UPPERBOUND DIST parameters is calculated defining with the OPT NEIGHBOUR COUNT (optimal neighbour sensors count) parameter.If there is any sensor that converges to a sensor has smaller than the distance defined with MAX CONVERGENCE DIST, this sensor will be non-optimal and the number of this sensor's non-optimal neighbour sensors are calculated by the NONOPT NEIGHBOUR COUNT parameter.The conditions for being optimal for any sensor can be considered in two cases: the number of calculated optimal neighbour sensors (OPT NEIGHBOUR COUNT) must be at least 1 and the number of calculated nonoptimal neighbour sensors (NONOPT NEIGHBOUR COUNT) must be equal to 0. The sensors in the area which comply with this condition are transferred to the OPT SENSORS[ ] sequence and the number of sensors to the OPT SENSORS COUNT (optimal sensors count) parameter.In conclusion, sensors which are placed in optimal locations according to the distance parameters defined grounding on convergence conditions are calculated by this suggested algorithm.As it is demonstrated in Figure 4 [30], the desired state in the suggested sensor detection algorithm based on EM is to make sensors converge to each other so they will be optimal.
The pseudocode of the optimal sensor detection algorithm is provided in Algorithm 7.

Applying the EM Algorithm for the Dynamic Deployment
Problem.Applied algorithm steps in the solution of the dynamic deployment problem of WSNs are as shown in Algorithm 8.
Each solution space in this algorithm represents an array that has  elements.Table 1 shows the solution array.The positions (, ) of mobile sensors within the area are elements of the solution array.

Results of the Simulation
In order to determine that the distribution algorithm based on EM which was suggested in this paper performs the dynamic distribution of mobile sensors more effectively, its performance has been compared with original ABC-and PSO-based distribution algorithms [31].In this section, firstly parameters of the algorithms were selected based on PSO and ABC.Then, parameter selection of the suggested algorithm based on EM has been done under the experimental conditions and presented in detail as case studies.

Parameter Selection for PSO and ABC Algorithms. PSO's
first version [32] has been applied in the dynamic distribution of sensors.Each particle is distributed randomly and the particles are updated in two phases.In the first phase, rate is measured as demonstrated in (10) as In the second phase, locations of the particles in the area are updated using the   =   + V  .rand() functions produce random numbers between (0, 1).  indicates the best location of the th particle,   indicates the best location of the particles neighbouring the th particle,   indicates the location of the th particle, and V  indicates its rate. 1 and  2 are the fixed positive parameters [16,32,33] that determine the performance of the algorithm and they are calculated by using (11) [31] as In (11), Max  1 , Min  1 , Max  2 , and Min  2 are the parameters that affect the performance of the algorithm.t indicates iteration time and  max indicates maximum iteration time.As a result of the experiments carried out, the Min  1 and Min  2 parameters that provide the best performance for both PSO and ABC have been taken as 1, and the Max  1 and Max  2 parameters have been taken as 3.4 [31].

Parameter Selection for the Suggested Algorithm Based on EM.
Case studies have been presented in this paper in order to determine the most suitable parameters to optimizing dynamic distribution of sensors by using the suggested distribution algorithm based on EM.In the case studies, 100 mobile sensors were distributed in a two-dimensional and 10,201 m 2 sensor area, and 10 Monte Carlo simulations were run, independently. and   parameters have been taken as 7 meters and 2 (14 meters), respectively.
Two scenario were done for each case study, and the OPT LOWERBOUND DIST, OPT UPPERBOUND DIST and MAX CONVERGENCE DIST parameters have been taken as √ 3, √ 3.2, and √ 1 in the 1st scenario and as (1) OPT SENSORS COUNT ← LENGTH( []) (2) for  = 1 to  do (3) OPT NEIGHBOUR COUNT ← 0, NONOPT NEIGHBOUR COUNT ← 0 (4) if sensor of  is not include to OPT [] then (5) for j = 1 to OPT SENSORS COUNT do (6) if  (  ,   ) between OPT LOWERBOUND DIST and OPT UPPERBOUND DIST then (7) OPT NEIGHBOUR COUNT ← OPT NEIGHBOUR COUNT + 1 (8) else if  (  ,   ) < MAX CONVERGENCE DIST (9) NONOPT NEIGHBOUR COUNT ← NONOPT NEIGHBOUR COUNT + 1 (10) end if (11) end for (12) if (NONOPT NEIGHBOUR COUNT == 0 AND OPT NEIGHBOUR COUNT >= 1) then (13) OPT SENSORS COUNT ← OPT SENSORS COUNT + 1 ( 14) OPT SENSORS[OPT SENSORS COUNT] ← i (15) end if (16) end if (17) end for Algorithm 7: Optimal sensor detection algorithm.√ 3, √ 3.5, and √ 1.3 in the 2nd scenario, respectively.The OPT NEIGHBOUR COUNT parameter has been taken as 1 to be common for both the scenarios in the case studies except for the case study 3.As it is demonstrated in Figure 4, maximum distance between sensors must be √ 3 in order to provide a perfect dynamic distribution [30].Therefore, in order to carry out optimum dynamic distribution of the sensors in the area, the distance parameters in our case studies have been defined in the ranges indicated in the scenarios.The simulations in this paper have been tested on a computer with 2.53 GHZ Core 2 Duo processor and 6.0 GB RAM, running with the MATLAB R2014a software.

Case Study 1: Sensors That Are in Optimal Locations according to Iteration Number.
In this case study, the number of sensors that were placed in optimum locations has been calculated according to the iteration number by using the suggested distribution algorithm and the distance parameters defined in each scenario after the initial random distribution of the sensors in the area, and the results of the simulation are presented on Table 2.
It is demonstrated on Table 2 that is a result of both scenarios, the average number of optimal sensors increased steadily as the iteration number increased.It has been determined that the average number of optimal sensors obtained in the 2nd scenario is better than the other.The reason is that while the optimal lower and upper bound parameters (12.1-12.5 meters) and the maximum convergence distance parameter value (7 meters) defined in the 1st scenario are increasing, the bigger number of sensors has been placed in optimal locations.However, increasing optimal lower and upper bound parameters would enable nonoptimal sensors to be optimal sensors.In the end, a bigger number of sensors' being placed in optimal locations would be possible.
In this study, because of the parameters in the 2nd scenario which provide the best results for the number of sensors placed in optimal locations are used as base, while, on average, only 9 sensors were in optimal locations in the iterations distributed randomly at the initial phase; 91 sensors were placed to optimal locations in the dynamic distribution done with the suggested sensor distribution algorithm based on EM algorithm after 200 iterations.The progress graphic of the average numbers of sensors which were placed in (1) Initialize First of all, the parameters which are used in the algorithm are described.These parameters are sensor detection radius , communication range of the sensors  , the size of the coverage area , the number of mobile sensors , dimension of the population , the maximum number of iteration , the maximum number of simulation .In order to calculate the charges of the sensors which are deployed in the solution space randomly according to the particle model in the EM algorithm, the objective function value of each sensor is calculated based on their existing positions as follows: where (  ) is the objective function value of sensor ,    is the coordinate value in the th dimension of the sensor .

(8) Calculate charge of the sensors
Sensors used in the network are assumed as a charged particle in the solution of the dynamic deployment problem.In order to calculate attraction-repulsion forces between the sensors based on the particle model of the EM algorithm which is expressed by Algorithm 1, the charge values of each sensor   are calculated using (2).( 9) Detect the optimal distributed sensors Sensors which have been placed in optimal locations are detected with the help of the optimal sensor detection algorithm stated in Algorithm 7, by using the distance parameters defined in Section 4.

(10) Calculate the resultant force of non-optimal sensors
A resultant force,   , which is calculated according to (3) by adding up the forces applied by the other sensors in the area to each sensor, is not optimal as a result of not being able to be placed in an optimal location, is applied to the non-optimal sensors.There is no need to calculate the resultant forces of optimal sensors.Because as it is stated on the next step, the 11th step, once the sensors are placed on optimal locations, their placements will not be changed so on.(11)

Update the locations of non-optimal sensors
Each non-optimal sensor in the area updates its current location according to Algorithm 5 by moving in the direction of the resultant force applied on it.The new position of non-optimal sensors is calculated using (4).( 12)  =  + 1 (13) end while (14) Find the coverages of grid points Coverage of every grid point by the sensors in the area being calculated using (8) which is expressed by Algorithm 6. ( 15) Calculate the total coverage rate of sensor area, according to coverage map After the reaching predefined the maximum number of iterations, the total coverage rate of the WSNs is calculated using ( 9). ( 16)  =  + 1 (17) end while Algorithm 8: The suggested EM algorithm based on sensor deployment algorithm.optimal locations along iterations for both the two scenarios is demonstrated in Figure 5.
According to the scenarios defined in this study, when the running times of the simulations are compared, according to the results demonstrated in Table 2, a more optimal running time was obtained in scenario 2 than the other scenario, at the same number of iterations.In conclusion, scenario 2 in this case study has provided a better solution, both in terms of the number of sensors placed in optimal locations and the running time of the simulations.

Case Study 2: Average Coverage Ratios of the Area according to the Iteration Number.
In this case study, it has been calculated that the average coverage ratios of the sensor area steadily increased as a result of running the distance parameters defined in both the scenarios during the  iterations, and the results of the simulation are presented in Table 3.It has been determined that the coverage ratios obtained in scenario 2 are higher than the other scenario.First reason of this is that, as it is stressed in case study 1, the distance parameters chosen for scenario 2 enable a bigger number of sensors to be placed in optimal locations compared to the other scenario, and coverage ratios of the area in this scenario are bigger.Another reason for the coverage ratio to be higher is that, as a result of increasing the maximum convergence distance between the nonoptimal sensor and optimal sensors in scenario 2, the sensors that are to be optimal will be prevented to converge to each other anymore; thus the sensors that are in optimal locations would cover a larger area.In this case study, scenario 2 provided a better solution in terms of the ratio of sensor area's being covered.
While in Figure 6(a), initial locations of the sensors with %74.48 coverage ratio after random distribution are demonstrated, in Figure 6(b), optimal locations of the sensors with %95.56 optimal coverage ratio after 200 iterations following the application of the distance parameters in scenario 2 on the suggested sensor distribution algorithm are demonstrated.

Case Study 3:
Average Coverage Ratios of the Area according to Optimal Neighbour Count.Another one of the conditions defined in Algorithm 7 for every sensor in the area to be optimal is that a sensor should be a neighbour to at least one optimal sensor.In this case study, the effect of increasing the number of optimal neighbour sensors after 100 iterations in both scenarios on the number of optimal sensors reached in the area and on the coverage ratio of the area is calculated and results of the simulation are presented in Table 4.
In this study, it has been detected in Table 4 that there were decreases in the number of sensors that were placed in optimal locations and average coverage ratio in both the scenarios, as optimal neighbour sensor count was increased.Since both the scenarios were run with a low iteration number, increasing the number of optimal neighbour sensors would make it hard for every sensor to be placed in optimal locations.As a result, since fewer sensors would be placed in optimal locations, coverage ratio of the area would be lower accordingly.In the case where the number of optimal neighbour sensors, defined with the OPT NEIGHBOUR COUNT parameter in both the scenarios, is increased, simulations have to be run with a higher iteration number for the sensor to be optimal.
In this case study, simulations of the iteration numbers that need to be used in order to place sensors in optimal locations without decreasing the coverage ratio of the area, in the case that the number of optimal neighbour sensors in both the scenarios is increased grounding on the distance parameters in scenario 2 in Table 4, were run and presented in Table 5.As the number of optimal neighbour sensors was increased, average iteration number that needed to be run in the simulation in order to get the desired number of optimal sensors increased as well steadily, which actually shows us the solution to the problem that occurred in Table 4. Therefore, as a solution to this problem, more iterations would need to be done in direct proportion, while the number of optimal neighbour sensors was increased.It can be interpreted from the simulation results in Table 5 that as the number of iterations was increased, averagely at the same levels the number of optimal sensors and the coverage ratios were obtained.In conclusion, as it is demonstrated in Figure 7, since average coverage area at same ratios would be obtained with a fewer number of iterations compared to the others in the case that the number of optimal neighbour sensors is taken as 1 as the best solution in this case study, sensors would converge more rapidly, in less time.

Case Study 4: Optimal Energy Consumptions according
to the Movement Distances of the Sensors.Improving energy efficiencies of sensors by minimising their energy consumptions is very important in terms of their lifetimes because sensors have only a limited amount of energy.Total movement distances of sensors are calculated by taking their initial random locations and target locations after their last iterations as base.The more location changes the sensors have in the area, the more energy they will consume.Also, since sensors' changing fewer locations would optimise their power consumptions, it would enable their lifetimes to be longer as well.
In this case study, optimal energy consumption will be detected by comparing energy consumptions in both the scenarios via taking each sensor's total movement distance with the suggested distribution algorithm.100 iterations were performed in 10 simulations in each of the two scenarios, according to the defined distance parameters in this study, and after each scenario, total movement distances of the sensors were calculated and their comparison are demonstrated in Figure 8.According to this comparison, average movement distance in Scenario 1 is 5518.9meters, and in scenario 2, it is 4207.dynamic distributions of which were done taking the distance parameters as base were optimal in scenario 2 as compared to those in scenario 1.Therefore, scenario 2 has offered a better solution than the other.

Simulations in an Ideal
Medium. 100 mobile sensors with detection radius of 7 meters each were used in an ideal medium of 10,000 m 2 where there were no obstructions that would inhibit the distribution of sensors to the desired zone in the wireless area.In order to obtain more reliable results while comparing the suggested sensor distribution algorithm with the other algorithms, dynamic distribution of the sensors was done running 20 Monte Carlo simulations on condition that the values of the size of the area, the number of mobile sensors in the area, and detection radiuses of the sensors are the same.While performing distribution of the sensors with the suggested distribution algorithm based on EM, the parameters in scenario 2 which were applied in case The first criterion in the algorithms compared in this paper is coverage ratios of sensor area.In each iterations, random distribution of the sensors was done independently and coverage ratios of the mentioned medium were calculated after 100, 500, 2000, 5000, and 10000 iterations.Dynamic distribution results of the original ABC and PSO algorithms [31] and the suggested distribution algorithm, which were compared after running sensors in the area with the stated iterations, are demonstrated in Table 6.
According to the iteration results demonstrated in Table 6, better coverage ratios were obtained in the suggested distribution algorithm compared to ABC and PSO coverage ratios.Moreover, after only 100 iterations, the suggested algorithm performed optimal distribution of the sensors in a short time and it means that the suggested algorithm converges the sensors more rapidly than the other two algorithms.The reason of this is that, once each sensor in the area, dynamic distribution of which is done according to Algorithm 8, is placed in an optimal location, its location does not change during the iterations again.
Optimal distribution of the sensors after running the suggested sensor distribution algorithm in this paper during the stated iterations is demonstrated in Figure 9.In these figures, pink nodes represent sensors, blue circles represent detection ranges of the sensors, and green areas represent the covered grid area.According to these figures, we can conclude that sensors covered the area effectively, doing a more rapid convergence with the use of the suggested sensor distribution algorithm, according to the numbers of iteration.
Performances of EM-, original ABC-, and PSO-based sensor distribution algorithms are compared in Figure 10.In order to make this comparison more reliable, initial random distribution ratio of the suggested sensor distribution algorithm was taken lower than the initial random distribution ratios of the compared algorithms, determined as 74.75%, keeping the same initial random distribution ratios of the original ABC and PSO algorithms [31].The reason for this is to show that, even though the initial random distribution ratio of the suggested distribution algorithm was lower, it provides a more rapid convergence compared to the other algorithms, reaching a higher coverage ratio which is 95.53% in 100 iterations as it is demonstrated in Table 6.In conclusion, we can say that, in this comparison, the suggested sensor distribution algorithm based on EM algorithm provides mobile sensors' distribution in the area with a more rapid convergence and has better performance than ABC-and PSO-based distribution algorithms based on the achieved optimal coverage ratios.

Figure 2 :
Figure 2: The sample of attraction or repulsion forces of the particles.

Figure 3 :
Figure 3: Generating the coverage map using the grid intersections (pixel points).

Figure 5 :
Figure 5: Average number of optimal sensors according to iteration number.

5 .
According to the results of the simulation, it has been detected that energy consumptions of the sensors International Journal of Distributed Sensor Networks

Figure 7 :
Figure7: Progress of the coverage ratios of area during iterations, taking the number of optimal neighbour sensors as base.

Figure 8 :
Figure 8: Progress of the total movement distances of all the sensors in the area.

Table 2 :
Simulation results of the optimal sensors count obtained along the iterations run for each scenario.

Table 3 :
Simulation results of the coverage ratios obtained during iterations run for each scenario.

Table 4 :
Simulation results according to optimal neighbour sensor count along the iterations run for each scenario.

Table 5 :
Simulation results of the effect of the number of optimal neighbour sensors on average the number of iterations.

Table 6 :
Results of the coverage ratios of the algorithms compared at the stated iterations.