The different currents available in the Sensor Battery model are (i) Transmit-Current (ii) Receive-Current (iii) IdleMode-Current, and (iv) SleepMode-Current

The energy consumed in each of these activities would is computed as:

  • Transmit-Energy-Consumed = Transmit-Current * Voltage * Time-for-which-node-transmits-packets
  • Receive-Energy-Consumed = Receive-Current  * Voltage * Time -for-which-node-receives-packets
  • IdleMode-Energy-Consumed = IdleMode-Current  * Voltage * Time-in-Idle-Mode
  • SleepMode-Energy-Consumed = SleepMode-Current  * Voltage * Time-in-sleep-mode

Total-Energy-Consumed = Transmit-Energy-Consumed + Receiver-Energy-Consumed+IdleMode-Energy-Consumed + SleepMode-Energy-Consumed

Here Time-for-which-node-transmits-packets is calculated with the formula

Time-for-which-node-transmits-packets = PHY_OUT - CARRIER_SENSE_END 

of each packet. The PHY_OUR and CARRIER_SENSE_END timestamps can be got from then Event Trace. (Note that the Event trace feature is not available in the Academic version of NetSim. It is only available with the standard version.)

Energy harvesting

NetSim also has an Energy-Harvesting Model and 

Energy-Harvested = Recharging-Current * Voltage * Time



Battery-Energy (at any time) = Initial-Energy - Total-Energy-Consumed + Energy-Harvested

The units in NetSim for current is mA, for Voltage is V and for Total-Energy-Consumed is mJ.  The Unit for Initial-Energy is mAH and this is converted to mJ for calculations since the output metrics are in mJ. The Initial energy in mAH is converted to mJ using the formula:

Initial Energy (mJ)= Initial Energy (mAH) * Voltage (V) * 3600

For example, if we set Initial energy=0.5mAH, and if the voltage in 1V then Initial Energy (mJ) = 1800 (i.e. =0.5*3600)

The default settings in the energy model in NetSim IoT/ WSN library is based on Table 1 in the following paper:

Accurate Prediction of Power Consumption in Sensor Networks

Related articles:




NetSim IoT:

NetSim Documentation: