# Energy-Aware Adaptive Weighted Grid Clustering Algorithm for Renewable Wireless Sensor Networks
## 6 Simulation and Performance Assessment  
### Simulation Environment  
Simulation results of the proposed solution are illustrated in this section by both tabular and graphical representations. We evaluated our proposed method with the single-hop routing and GR-Protocol algorithm regarding vacation time, remaining energy and energy consumption for each node. The default parameters used in the simulation are written below in Table 2.  
The computation and simulation were carried out in MATLAB [40]. The hardware requirements include an Intel Core i5 and minimum 4 GB of RAM. In all instances, the time of the WSN was measured in seconds. Sensor nodes are deployed in a 1000 \(\times\) 1000-m square area by using omni-directional antenna parameters. For each node, we picked a regular NiMH battery equipped with a charge receiving coil. The maximum and minimum energy for each node are considered on the specifications of NiMH batteries where the nominal cell voltage is 1.2 V and the electricity quantity is 2.5 Ah [41]. Accordingly, we have the values of E\({}_{max}\) and E\({}_{min}\) as follows:  
1. E\({}_{max}\) = 1.2 \(\times\) 2.5 \(\times\) 3600 seconds = 10,800 J = 10.8 kj
2. E\({}_{min}\) = 0.05 \(\times\) E\({}_{max}\) = 540 J = 0.54 kjSimulation is initialized with the maximum amount of energy charge at each node. If the energy level of any node reaches below the E\({}_{min}\) (540 J), the node does not remain operational. The simulation model is like the numerical analysis that uses different numerical approximations. First, the proposed shortest traveling path for the WPCD is implemented for the maximization of the objective function (i.e., \(\frac{\tau_{\text{max}}}{\tau}\)). The parameters (i.e., \(\tau_{\text{max}}\), \(\tau\)) are calculated from numerical computations. Subsequently, as in the module on model design, the provable-optimal solution is developed for routing protocol based on the proposed weighted grid clustering, arrival time of the WPCD, charging time of the single node and total charge cycle time of the entire network. An energy consumption model is handling the energy consumed by the WSN in single-hop and dynamic (grid clustering) routing. Comparing numerical results shows the overall behavior of the network linked with the renewable charge cycle. Finally, to show the uniformity of the results, mean and variance are calculated by repeating the experiment in different situations which are as follows:  
1. Different types of routing scenario (single-hop and grid clustering)
2. Diverse values of weighted parameters (\(\alpha\), \(\beta\) and \(\gamma\) are shown in Figure 4)
3. Different locations of deployed nodes (11 different cases to compute the mean and variance)
4. Considering the special situations of nodes (busy nodes, CH nodes and idle nodes)  
Generally, the WPCD traverses the randomly deployed node on the physical path, P. Deployment of nodes is shown in Figures 5-7 during different simulation environments. In Figure 5, the red dot is the WPCD, moving in the WSN to charge the battery of each node, whereas the triangle symbol is the BS. Figure 6 presents the clustering scope as red lines in one simulation case. Figure 7 displays the square-sized grid division in another case. Figure 7 also shows the CH as a black colored node in the designated grid. After completing the deployment, simulation ran for one hour to get the desired results. Observing the graphical results, it was concluded that the energy consumption in grid clustering routing is less for data transmission as compared with typical single-hop routing and GR-Protocol.