# A Compact Bat Algorithm for Unequal Clustering in Wireless Sensor Networks
## 5 Experiments for Clustering in WSNs Problem
### Equal Clustering Formation  
The optimization problem is dealt with by minimizing the objective function in Equation (22). The initial setting for the oBA and the cBA is the same condition in the WSN (denoted as oBA-WSN) and cBA-WSN), e.g., a maximum iteration is set to 2000, the number of runs is set to 25. (Readers refer to parameters setting of the loudness, frequencies, and virtual population in Section 4). The initial energy parameters of the sensor net are flowing: \(l=1024\) bit, \(E_{j}=0.5\) J, \(E_{mp}=0.0013\) pJ/bit/m\({}^{4}\), \(E_{fs}=10\) pJ/bit/m\({}^{2}\), \(E_{DA}=5\) nJ/bit/signal, \(E_{elex}=50\) nJ/bit [31]. The experimental results of the proposed cBA are compared with the cases of PSO: the time-varying inertia weight (PSO-TVIW), and time-varying acceleration coefficients (PSO-TVAC) in [43] and the oBA [44] with respect to solution quality and time running. The result averages the outcomes from all runs.  
Table 7 compares the performance quality and running time for optimizing the clustering formation in WSNs for four methods of the cBA - WSN, PSOTVAC - WSN, PSOTVIW - WSN, and the oBA - WSN. Clearly, the average value of cBA for the objective function are faster than those obtained by other approaches of PSO. The applied cBA for optimizing the clustering formation is not as different as convergence using oBA. But, the total time consumption of the cBA method is fastest at only 2.445 min taken because the working variable memory is smallest.  
Figure 5a indicates four curves of the cBA - WSN, oBA - WSN, PSOTVIW - WSN and PSOTVAC - WSN methods for clustering formation for WSN. It is evident that cBA-WSN is as good as BA-WSN and faster than those of PSOTVIW - WSN and PSOTVAC - WSN methods in convergence.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Methods**} & \multirow{2}{*}{**Pop. Size**} & \multirow{2}{*}{
\begin{tabular}{c} **Iterations/a** \\ **Run** \\ \end{tabular} } & \multirow{2}{*}{**Min**} & \multirow{2}{*}{**Max**} & \multirow{2}{*}{**Mean**} & \multirow{2}{*}{**Standard**} & \multirow{2}{*}{**Running**} \\  & & & & & & & **Deviation** & **Time (m)** \\ \hline PSO – TVAC [43] & 20 & 2000 & 5.72 \(\times 10^{1}\) & 8.41 \(\times 10^{2}\) & 2.57 \(\times 10^{2}\) & 2.87 \(\times 10^{2}\) & 3.01 \(\times 10^{0}\) \\ \hline PSO – TVIW [43] & 20 & 2000 & 6.80 \(\times 10^{1}\) & 6.35 \(\times 10^{2}\) & 2.25 \(\times 10^{2}\) & 2.83 \(\times 10^{2}\) & 3.10 \(\times 10^{0}\) \\ \hline oBA-WSN [44] & 20 & 2000 & 6.93 \(\times 10^{1}\) & 7.57 \(\times 10^{2}\) & 2.03 \(\times 10^{2}\) & 2.69 \(\times 10^{2}\) & 3.26 \(\times 10^{0}\) \\ \hline
**The proposed cBA-WSN** & **1** & 2000 & **5.65\(\times 10^{1}\)** & **7.65\(\times 10^{2}\)** & **2.01\(\times 10^{2}\)** & **2.32\(\times 10^{2}\)** & **2.04\(\times 10^{0}\)** \\ \hline \hline \end{tabular}
\end{table}
Table 7: The comparison of averaged outcomes and computation time of cBA-WSN with other methods, e.g., oBA-WSN [44], PSO-TVAC [43] and PSO-TVIV [43] for equal clustering formation.  
Figure 5: Two scenarios of clustering and unequal clustering methods in WSNs.