# A PSO-Based Uneven Dynamic Clustering Multi-Hop Routing Protocol for Wireless Sensor Networks
## 6 Simulation and Results  
To evaluate our proposed protocol, MATLAB is used to perform simulations. In order to simplify the entire simulation process, it is assumed that the network has an ideal MAC (Medium Access Control)  
Figure 14: Routing diagram in simulation environment. Figure 13: The distribution schematic of Normalization sum of FND and LND with different \(u_{1}\), \(u_{2}\). layer. The data link communication is reliable and the energy of the BS is not restricted. In the network control process, there is no any energy load for sending control messages and receiving data. Only the energy consumption of the sensor nodes is considered during the experiments. The parameters of the network areas are pre-set. The simulation parameters of the network area are shown in Table 1.  
Simulation experiments were carried out on UCCGRA, multi-hop EEBCDA, EEMRP, CAMP, PSO-ECHS, PSO-SD and PUDCRP in the corresponding network circumstances. The proposed algorithm is based on region partitioning. Therefore, this paper mainly compares the algorithm with the algorithms based on grid region partitioning and PSO based clustering algorithm. Nodes' death states of the protocols are shown in Table 2.  
Where FND indicates the round in which the first dead node occurs. HND indicates the round in which half of nodes die. LND indicates the round in which 80% nodes die. Table 2 shows that the PUDCRP protocol runs more rounds than the other six protocols under the same network conditions. In the 400 m \(\times\) 400 m network, compared with UCCGRA, multi-hop EEBCDA, EEMRP, CAMP, PSO-ECHS and PSO-SD, the time of the first death node in PUDCRP was delayed by 18.00%, 508.06%, 216.81%, 33.69%, 528.33% and 62.85%, respectively. HND of PUDCRP is increased by 31.95%, 61.89%, 12.67%, 61.50%, 109.42% and 52.81%, respectively. The number of running rounds of PUDCRP is increased by 48.75%, 63.21%, 68.89%, 7.36%, 74.21% and 69.81%, respectively. PUDCRP more effectively balances the energy consumption of the network and prolongs the network lifetime than the other six protocols. Table 3 shows the average and standard deviation of residual energy of nodes in the 500 th round in the 400 m \(\times\) 400 m network with 200 nodes. AVE indicates the average residual energy of nodes. STD indicates the standard deviation of residual energy of nodes. The more average residual energy of nodes, more effective the energy efficiency of the algorithm. Lower the standard deviation of residual energy of nodes, more balanced energy consumption. The average residual energy of nodes in PUDCRP is 22.16%, 121.30%, 8.92%, 33.73%, 197.28% and 21.05% higher than the other six algorithms, \begin{table}
\begin{tabular}{l c} \hline \hline
**Parameter** & **Value** \\ \hline Area of network & \(M\times M\) (M = 200 m, 400 m) \\ Co-ordinate of sink & \((\frac{M}{2},M)\) \\ Number of sensor nodes (\(n\)) & 100 to 500 \\ Initial energy of sensor nodes (\(E_{0}\)) & 0.5 J \\ Energy consumption on circuit (\(E_{\text{elec}}\)) & 50 nJ/bit \\ Free-Space channel parameter (\(\varepsilon_{\text{fs}}\)) & 10 pJ/bit/m\({}^{2}\) \\ Multi-path channel parameter (\(\varepsilon_{\text{mp}}\)) & 0.0013 pJ/bit/m\({}^{4}\) \\ Distance threshold (\(d_{0}\)) & \(\sqrt{\frac{\varepsilon_{\text{fs}}}{\varepsilon_{\text{mp}}}}\) \\ Data packet size & 4000 bits \\ Control packet size & 50 bits \\ Number of iterations & 2500 \\ The particle Velocity (\(v\)) & \(-35\leq v\leq 35\) \\ the acceleration coefficients (\(\varepsilon_{1}\),\(\varepsilon_{2}\)) & \(\varepsilon_{1}=2\), \(\varepsilon_{2}=2\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Death State** & **UCCGRA** & **Multi-Hop EEBCDA** & **EEMRP** & **CAMP** & **PSO-ECHS** & **PSO-SD** & **PUDCRP** \\ \hline FND & 639 & 124 & 238 & 564 & 120 & 463 & 754 \\ HND & 1011 & 824 & 1184 & 826 & 637 & 873 & 1334 \\ LND & 1040 & 916 & 1441 & 888 & 733 & 911 & 1547 \\ \hline \hline \end{tabular}
\end{table}