In order to analyze the gain results, four different scenarios have been proposed. In the first one (A) all of the sensors have the same power available for communications (this is the case of a WSN composed with the same sensor type) and the sensors are placed only in two dimensions. In the second scenario (B) the sensors have random available power for communications (this is the case of a WSN composed with different sensor types) and the sensors are again placed only in two dimensions. In the third scenario (C) all sensors have the same available power for the communications but the sensors are placed in three dimensions. In the fourth scenario (D) the sensors have random available power for communications and again the sensors are placed in three dimensions.
4.1. Theoretical Gain Results
In order to analyze the different gain factors implied in the energy efficiency in a WSN, in this subsection, the distance between the nodes and the HECN has not been taken into account. That is, the gain factor obtained is only due to the beamforming technique. The gain results are analyzed: Figure 4
, Figure 5
and Figure 6
provide the gain values for the two different desired search angles, all scenarios and both antennas, with 10 sensors, 20 sensors, and 50 sensors, respectively. The gain values are computed in terms of the increment factor regarding the gain in the case beamforming is not used; that is, the gain obtained for a unitary node for the desired direction and provided by its antenna pattern.
Each experiment is repeated 30 times so that 30 different sets of sensor positions are defined, in order to statistically validate the results. In the result figures (Figure 4
, Figure 5
and Figure 6
) the subfigures have the following characteristics: isotropic ideal antenna (φ
= 0° and θ = 45°) in Figure 4
a (upper left), dipole antenna (φ
= 0° and θ = 45°) in Figure 4
b (upper right), isotropic ideal antenna (φ
= 45° and θ = 45°) in subfigure c (lower left), and dipole antenna (φ
= 45° and θ = 45°) in subfigure d (lower right). In all subfigures it is plotted with a red line the mean gain of each scenario. In Figure 4
it is shows the results for 10 nodes and 30 emulations for each scenario (four scenarios for each subfigure). The aspect of all subfigures is very similar; that is, the influence of the directions and the antenna is very limited. For example the mean gain for the scenario A, for Figure 4
a is 6.50, for Figure 4
b is 6.60, for Figure 4
c is 6.51, and Figure 4
d is 6.61, which means that the maximum difference between subfigures is only 0.11 (1.6%). However, the gain factor is different for the different scenarios, around 6.55 for scenario A; around 9.7 for scenario B; around 7 for scenario C; and around 10 for scenario D. This means that the scenarios with fixed power have less gain than the scenarios with sensors with different power. This is because the genetic algorithm tries to assign the node with lower power to the communication. The lower the power to conform the beamforming, the higher the lifetime of the WSN. For 10 nodes there exists little difference between 2D and 3D scenarios.
shows the results for 20 nodes and 30 emulations for each scenario (four scenarios for each subfigure). For 20 nodes, the aspect of all of the subfigures is also very similar, that is, the influence of the directions and the antenna is very limited. For example, the mean gain for scenario B, for Figure 5
a is 16.03, for Figure 5
b is 15.91, for Figure 5
c is 16.41, and for Figure 5
d is 15.98, which means that the maximum difference between subfigures is only 0.5 (3.0%). However, the gain factor is different for the different scenarios, around 8.4 for scenario A, around 16.2 for scenario B, around 10.7 for scenario C, and around 18.8 for scenario D. Again, the scenarios with fixed power have less gain than the scenarios with sensors with different power for the same reasons as that for 10 nodes. For 20 nodes there exists differences between the 2D and the 3D scenarios, and the gain factors for 2D scenarios are around 15% lower than the ones for 3D scenarios. This may be influenced by the major complexity of the calculations in the 3D case which may lead to non-optimal solutions when the GAs algorithms are applied.
show the results for 50 nodes and 30 emulations for each scenario (four scenarios for each subfigure). Again, for 50 nodes, the aspect of all the subfigures is very similar, which means that the influence of the directions and the antenna is very limited. For example, the mean gain for the scenario D, for Figure 6
a is 22.25, for Figure 6
b is 21.6, for Figure 6
c is 21.66, and Figure 6
d is 21.93, which implies that the maximum difference between subfigures is only the 0.65 (2.9%). As it is expected, the gain factor is again different for the different scenarios, around 7.75 for scenario A, around 15.8 for scenario B, around 10.3 for scenario C, and around 21.6 for scenario D. This means, in a similar way to the Figure 4
and Figure 5
, that the scenarios with fixed power have less gain than the scenarios with sensors with different power. For 50 nodes there exist more differences between 2D and 3D scenarios, the gain factors for 2D scenarios are around a 30% less than for 3D scenarios for fixed power and around 40% less for sensors with random power for communications. It is clear from Figure 6
that the variability of scenarios with 50 sensors is high. For example, in subfigure b in scenario D, the emulation with the higher gain has a gain factor of 34 and the emulation with less gain has a gain factor of 13.4; that is, the emulation with less gain is only 39.4% than that of the emulation with more gain.
shows that, for the results considering two, five, 10, 20 and 50 nodes and 30 emulations for four scenarios (one scenario for each subfigure), the direction has little influence. Consequently, it is only shown for φ
= 45° and θ = 45°. The subfigures have the following characteristics: isotropic ideal antenna and scenario B in Figure 7
a (upper left), dipole antenna and scenario B in Figure 7
b (upper right) and isotropic ideal antenna, scenario D in Figure 7
c (lower left) and dipole antenna and scenario B in Figure 7
d (lower right). Again, in all of the subfigures, the mean gain of each scenario is plotted with a red line. It is shown that the variability of the results increases with the number of sensors. With a low number of sensors (two and five) the standard deviation of results is low, and for a high number of sensors (20 and 50) the variability is very high. Additionally, in this figure, it is shown that the gain increase with the number of elements, except for 50 sensors. More details can be observed in Table 1
and Figure 8
shows the mean gain factor for all scenarios with two antenna and φ
= 45° θ = 45°. Figure 8
shows the same data that is in Table 1
in a graphical mode. Moreover, a linear reference for visual performance it is added. In this figure it is possible to observe that, for a low number of sensors (two and five) all scenarios work well; the main gain factor is approximately equal to the number of sensors. For an intermediate number of sensors (10), only scenarios B and D obtain a mean gain factor near the number of sensors. Meanwhile, scenarios A and C lose more than 30% of the main gain factor with respect to Scenarios B and D. No great difference between 2D and 3D position is found. For 20 sensors, the unique scenario that has a mean gain factor similar to the number of sensors is scenario D. With 20 sensors there exist differences between all scenarios; 3D scenarios work better than 2D scenarios, and scenarios with sensors with random power have more possibilities to conform the beamforming than scenarios with sensors with fixed power. Finally, with 50 sensors, only 3D scenarios (C and D) increase the mean gain factor obtained with 20 sensors, and the increase is small and very far from the number of sensors.
The main reason that explains these results of the GA has to do with the size of the instances and the stopping condition of the algorithm, which has been kept the same in all the scenarios. As the number of sensors increase, the search space to be explored by the GA becomes much larger, but the sampling size (i.e., the number of function evaluations) is constant: 100 individuals × 100 generations = 10,000 evaluations. This clearly favors the small instances for which the GA is given more chance to find better quality solutions. Either increasing the population size of the GA, its number of generations to stop, or both would be required together with advanced diversity preservation mechanism that avoid the search to get stuck in local optima (premature convergence). In any case, there is room for improvement, especially when large instances are addressed.
From the point of view of the node synchronization, the synchronization of 50 sensors can imply a significant problem because all of the nodes must transmit at the same time. Additionally, the calculation of the amplitudes and phases is not a trivial aspect for a genetic algorithm because the number of variables to be optimized is equal to 100. Therefore, a good choice can be the clusterization of the WSN, when the number of sensors is high. This is discussed in the next section.
4.2. Cluster Gain Results
In this section, the sensor network has been divided into two clusters to study the behavior of the sensor network when the number of sensors is high. To split into two clusters of sensors, we have used the method of k-means, which is one of the simplest and popular, as explained in [15
]: “One of the most popular and simple clustering algorithms, K-means, was first published in 1955. In spite of the fact that K-means was proposed over 50 years ago and thousands of clustering algorithms have been published since then, K-means is still widely used”. The procedure is as follows: first the K-means algorithm is applied to all sensors, obtaining two clusters, then, the beamforming technique is applied to the two clusters. To maintain the computational costs, a unique genetic algorithm has been applied in order to optimize the two clusters simultaneously, so that only one genetic algorithm optimizes the phases and amplitudes of the two clusters. Obviously, it would be a better strategy to apply two different genetic algorithms, one to each of the clusters. Figure 9
shows the results of performing optimization with two clusters, where 10, 20, and 50 sensors are simulated. All of the subfigures are for the Scenario D. The subfigures have the following characteristics: isotropic ideal antenna, φ
= 0° and θ = 45° in subfigure a (upper left), dipole antenna, φ
= 0° and θ = 45° in subfigure b (upper right), isotropic ideal antenna, φ
= 45° and θ = 45° in subfigure c (lower left) and dipole antenna, φ
= 45° and θ = 45° in subfigure D (lower right). Figure 9
shows that the gain factor is reduced (50%) when 10 and 20 sensors are simulated. This result is coherent since two clusters with half of the elements are being combined. As it has been stated in previous sections, the gain for scenario D is approximately equal to the number of elements in the range of 0–20. It is observed that the variability of the results is much higher when considering two clusters than when considering just one. However, with 50 sensors the gain achieved is about 12, not reaching the expected gain of 20. This gain value is expected because, with two clusters with more than 20 sensors, the gain at each cluster must be equal to the number of sensors in the cluster. The same explanation as in the previous section holds here. More sensors enlarge the search space to be explored by the GA, whilst is configuration remains the same concerning the number of function evaluations performed (sampling size).