# Performance Analysis of IoT-Based Health and Environment WSN Deployment
## 4 Experimental Results and Discussion
### Convergence Rate  
One of the important criteria for the suitability of a meta-heuristic algorithm is its convergence rate [89]. This criterion is selected to analyze the performance of the both algorithms for the IoT-based network deployment. Figure 6 shows the global fitness values of both algorithms for 20 different executions for the WSN deployment with optimizing the coverage and the lifetime. In the figure, the results of each execution for different iterations are shown with a line. In each iteration of the BA and PSO algorithms, the positions of the sensors were randomly changed (Equations (14) and (15)) with consideration of the connectivity constraint and creating the MST graph between the sensor nodes and then the fitness value was calculated by computing the network coverage and lifetime (Equations (3), (4), and (9)). The global fitness of each iteration is the best fitness value that was obtained within the population size of the algorithms. The global fitness has changed from 0.627 to 0.755 in 100 iterations of BA while it has changed from 0.625 to 0.817 in 70 iterations of PSO algorithm (in the best iteration). Based on the figure, both algorithms have a higher convergence rate in the first iterations and in the subsequent runs. The convergence rate is reduced and continued smoothly until the global fitness is found. However, the convergence rate of the BA faster than that of PSO algorithm in the first ten iterations because of using neighborhood searching around elite and better bees by onlooker bees in BA algorithm. In general, the convergence rate of PSO is smoother than that of BA in all the iterations. The PSO algorithm is converged in the first 30 iterations. The reason for this issue could be small changes in the particles in each iteration. In addition, this issue shows that the PSO algorithm has better performance than BA in dealing with local optimums.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Run No.** & **Iteration Number** & \(p\) & \(w\) & \(c_{1}\) & \(c_{2}\) & **Fitness Value** \\ \hline
1 & 20 & 100 & 0.3 & 0.5 & 0.3 & 0.636 \\
2 & 20 & 100 & 0.3 & 1.5 & 0.3 & 0.639 \\
3 & 20 & 100 & 0.3 & 2 & 0.3 & 0.657 \\
4 & 20 & 100 & 0.  
The average of the best fitness values for each iteration obtained by 20 different executions are shown in Figure 7. The figure shows, in general, the convergence of the PSO is better than that of BA and thus is better performance for network deployment for environmental and health sensors. The maximum average of fitness obtained 0.764 using the PSO algorithm and 0.727 using BA while the minimum average values of the two algorithms obtained approximately the same 0.64. In the 20 first iterations, BA found better values and in the other iterations PSO found better values. In other words, the PSO algorithm in the 20 first iterations converges to lower values of the fitness function than BA, while in the other iterations it convergence to much higher values; the best fitness value found by the PSO algorithm in the integration is around 70, but was not found by BA. These results indicate that the PSO algorithm, approximately 5% on average, gained the better positions of the sensors regarding the trade-off between the network coverage and lifetime than BA.