Design and Simulation of Wireless Sensor Network in NS2
Genita Gautam, Biswaraj Sen · International Journal of Computer Applications · 2015
This paper provides a study of how to design and implement Wireless Sensor Network (WSN) in NS2 (Network Simulator version 2).A wireless sensor network (WSN) consists of a number of sensors which are spatially distributed and are capable of computing, communicating and sensing.NS2 is an event-driven simulation tool that is useful in studying the dynamic nature of computer networks.NS2 provides users with executable command ns which take on input argument, which is the name of a Tool Command Language (TCL) simulation scripting file.Network Animator (NAM) is a TCL based animation tool for viewing network simulation traces and real world packet traces.Scripting languages such as AWK (Aho Weinberger Kernighan) script and PERL script can be used to calculate the performance metrics using these trace files.A simple simulation consisting of 17 nodes and calculation of average end-to-end delay and average energy consumption is shown.