It depends on the specific wireless sensor network applications and requirements.
If you focus on energy consumption, and do not care about the data transmission process, you can consider using MATLAB. Here are the MATLAB code of several typical sensor network energy-aware routing protocol. You can refer to its energy consumption calculation.
It depends on the specific wireless sensor network applications and requirements.
If you focus on energy consumption, and do not care about the data transmission process, you can consider using MATLAB. Here are the MATLAB code of several typical sensor network energy-aware routing protocol. You can refer to its energy consumption calculation.
The power consumption is governed by certain equations and depending on the protocol used in the WSN concerned and the routing it needs to be formulated and applied in which case even any simulator is not needed. However, ns2 has in built features to calculate the power which it uses depending on the protocol chosen.
You may take in consideration an other tool called "Cooja". This tool is included in the Contiki operating system. If you intend to simulate protocols on IP based nodes, in my opinion, Cooja is more adapted. In fact, it offers several built in protocols that you can use such as 6Lowpan and RPL.
I have faced a similar problem when I needed to develop a WSN simulator for MIB520 devices http://www.memsic.com/wireless-sensor-networks/MIB520. These devices use a protocol which was not available in ns-2 and was scheduled to be developed in the future in ns-3 (don't know the current status now). I ended up using object based python design to create an event driven simulator and implemented the protocol parameters myself from scratch. The same approach could be done in Matlab.
Consider if the tool supports the protocol your devices use.
It depends on different scenarios; general every day usage and/or special environmental condition [application dependent] often determines the energy consumption and packet loss performance; Unslotted Algorithm, Enhanced ShockBurst (ESB) / ShockBurst (SB); the likes of MATLAB based iWEEP_SW_GUI.
Have a look at NANHAO ZHU's PhD These of 5 Jun 2014. "Simulation and optimization of energy consumption in wireless sensor networks"
It is very accurate, avoids rewrite code since it reuses the same tinyOS object code and you can choose several independent measurements as radio or cpu energy consume.
MATLAB can be used for energy consumption computation. It can keep track of initial energy and energy consumed during every event occurrence in wireless sensor network, or MANET or wireless network. so you should go with MATLAB for such energy consumption computaions.
You could also check on Castalia and omnet + inet2.99. Both of them have modules for energy consumption. In the case of inet, it also provides a module for energy generation.
You can use General Algebraic Modeling System (GAMS), which is a high-level modeling system for mathematical programming and optimization. It consists of a language compiler and a stable of integrated high-performance solvers. GAMS is tailored for complex, large scale modeling applications, and allows you to build large maintainable models that can be adapted quickly to new situations.
We have found NetSim to be very useful for energy consumption calculations in WSN. Users can also set energy consumed in transmission, reception, idle mode through the UI. And you can quickly modify the code if you need time varying consumption.
Energy harvesting can also be done and some projects on the same are available at http://tetcos.com/file-exchange.html