The second
packet is the Address Resolution Protocol (ARP) packet. If the time required
to transmit and receive all packets is added to the idle time, the result equals
107
the total simulation time. This means that NS2 code does not account for the
sleep time!
To confirm this conclusion, we calculated the total energy consumed by
node A. The total energy adds up to 10.1598 J which is found to be the same
value the NS2 energy model produces. It is clear that the NS2 energy model
does not account for the sleep time, and yet considers it as an idle time.
To overcome this problem, we performed the Energy Model modifications
in NS2 [20]. To verify the correctness of our modification, we performed the
same test as above when setting the sleep power to 0, and we obtained the
results in Table 2.
The total event time column adds up to 10.085139 seconds which is equal
to the total simulation time. The idle time in Table 2 is less than that of Table
1. This is because the sleep time is taken into consideration in our simulation
this time. From Table 2, the total energy consumed at node A is calculated
to be 8.956139 which is equal to the same value obtained by the simulation.
This verifies that our code produces the desired energy results.
6 Conclusion
Wireless Sensor Networks (WSNs) are large collections of tiny nodes that sense
the surrounding environment and communicate with each other via wireless
links.
Pages:
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188