src/energy/doc/energy.rst
author Tom Henderson <tomh@tomh.org>
Mon, 28 Sep 2015 20:27:25 -0700
changeset 11676 05ea1489e509
parent 11341 aba202c0c922
permissions -rw-r--r--
bug 2184: Integer overflow in MacLow
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
Energy Framework
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
----------------
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
     4
Energy consumption is a key issue for wireless devices, and wireless
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
     5
network researchers often need to investigate the energy consumption
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
     6
at a node or in the overall network while running network simulations
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
     7
in ns-3. This requires ns-3 to support energy consumption
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
     8
modeling. Further, as concepts such as fuel cells and energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
     9
scavenging are becoming viable for low power wireless devices,
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    10
incorporating the effect of these emerging technologies into
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    11
simulations requires support for modeling diverse energy sources in
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    12
ns-3. The ns-3 Energy Framework provides the basis for energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    13
consumption, energy source and energy harvesting modeling.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
Model Description
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
=================
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
7140
d203296efb63 Fix an example dependency problem and fix some paths in the documentation
Mitch Watrous <watrous@u.washington.edu>
parents: 6742
diff changeset
    19
The source code for the Energy Framework is currently at: ``src/energy``.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
Design
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
******
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    24
The ns-3 Energy Framework is composed of 3 parts: Energy Source,
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    25
Device Energy Model and Energy Harvester.  The framework is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    26
implemented into the ``src/energy/models`` folder.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
Energy Source
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
#############
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    31
The Energy Source represents the power supply on each node. A node can
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    32
have one or more energy sources, and each energy source can be
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    33
connected to multiple device energy models. Connecting an energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    34
source to a device energy model implies that the corresponding device
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    35
draws power from the source. The basic functionality of the Energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    36
Source is to provide energy for devices on the node. When energy is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    37
completely drained from the Energy Source, it notifies the devices on
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    38
node such that each device can react to this event. Further, each node
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    39
can access the Energy Source Objects for information such as remaining
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    40
energy or energy fraction (battery level). This enables the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    41
implementation of energy aware protocols in ns-3.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    43
In order to model a wide range of power supplies such as batteries,
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    44
the Energy Source must be able to capture characteristics of these
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    45
supplies. There are 2 important characteristics or effects related to
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    46
practical batteries:
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    48
Rate Capacity Effect
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    49
  Decrease of battery lifetime when the current draw is higher
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    50
  than the rated value of the battery.
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    51
  
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    52
Recovery Effect
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    53
  Increase of battery lifetime when the battery is alternating
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    54
  between discharge and idle states.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    55
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    56
In order to incorporate the Rate Capacity Effect, the Energy Source
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    57
uses current draw from all the devices on the same node to calculate
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    58
energy consumption. Moreover, multiple Energy Harvesters can be
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    59
connected to the Energy Source in order to replenish its energy. The
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    60
Energy Source periodically polls all the devices and energy harvesters
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    61
on the same node to calculate the total current drain and hence the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    62
energy consumption. When a device changes state, its corresponding
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    63
Device Energy Model will notify the Energy Source of this change and
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    64
new total current draw will be calculated. Similarly, every Energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    65
Harvester update triggers an update to the connected Energy Source.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    66
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    67
The Energy Source base class keeps a list of devices (Device Energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    68
Model objects) and energy harvesters (Energy Harvester objects) that
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    69
are using the particular Energy Source as power supply. When energy is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    70
completely drained, the Energy Source will notify all devices on this
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    71
list. Each device can then handle this event independently, based on
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    72
the desired behavior that should be followed in case of power outage.
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
    73
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    75
Device Energy Model
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    76
###################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    77
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    78
The Device Energy Model is the energy consumption model of a device
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    79
installed on the node. It is designed to be a state based model where
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    80
each device is assumed to have a number of states, and each state is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    81
associated with a power consumption value. Whenever the state of the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    82
device changes, the corresponding Device Energy Model will notify the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    83
Energy Source of the new current draw of the device. The Energy Source
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    84
will then calculate the new total current draw and update the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    85
remaining energy.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    86
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    87
The Device Energy Model can also be used for devices that do not have
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    88
finite number of states. For example, in an electric vehicle, the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    89
current draw of the motor is determined by its speed. Since the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    90
vehicle's speed can take continuous values within a certain range, it
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    91
is infeasible to define a set of discrete states of
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    92
operation. However, by converting the speed value into current
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    93
directly, the same set of Device Energy Model APIs can still be used.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    94
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
    95
Energy Harvester
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    96
################
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
    97
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    98
The energy harvester represents the elements that harvest energy from
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
    99
the environment and recharge the Energy Source to which it is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   100
connected. The energy harvester includes the complete implementation
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   101
of the actual energy harvesting device (e.g., a solar panel) and the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   102
environment (e.g., the solar radiation). This means that in
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   103
implementing an energy harvester, the energy contribution of the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   104
environment and the additional energy requirements of the energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   105
harvesting device such as the conversion efficiency and the internal
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   106
power consumption of the device needs to be jointly modeled.
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   107
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   108
10883
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   109
WiFi Radio Energy Model
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   110
#######################
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   111
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   112
The WiFi Radio Energy Model is the energy consumption model of a Wifi
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   113
net device. It provides a state for each of the available states of
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   114
the PHY layer: Idle, CcaBusy, Tx, Rx, ChannelSwitch, Sleep. Each of
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   115
such states is associated with a value (in Ampere) of the current draw
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   116
(see below for the corresponding attribute names). A Wifi Radio Energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   117
Model PHY Listener is registered to the Wifi PHY in order to be
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   118
notified of every Wifi PHY state transition. At every transition, the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   119
energy consumed in the previous state is computed and the energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   120
source is notified in order to update its remaining energy.
10883
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   121
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   122
The Wifi Tx Current Model gives the possibility to compute the current
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   123
draw in the transmit state as a function of the nominal tx power (in
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   124
dBm), as observed in several experimental measurements. To this
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   125
purpose, the Wifi Radio Energy Model PHY Listener is notified of the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   126
nominal tx power used to transmit the current frame and passes such a
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   127
value to the Wifi Tx Current Model which takes care of updating the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   128
current draw in the Tx state. Hence, the energy consumption is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   129
correctly computed even if the Wifi Remote Station Manager performs
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   130
per-frame power control. Currently, a Linear Wifi Tx Current Model is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   131
implemented which computes the tx current as a linear function
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   132
(according to parameters that can be specified by the user) of the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   133
nominal tx power in dBm.
10883
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   134
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   135
The Wifi Radio Energy Model offers the possibility to specify a
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   136
callback that is invoked when the energy source is depleted. If such a
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   137
callback is not specified when the Wifi Radio Energy Model Helper is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   138
used to install the model on a device, a callback is implicitly made
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   139
so that the Wifi PHY is put in the SLEEP mode (hence no frame is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   140
transmitted nor received afterwards) when the energy source is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   141
depleted. Likewise, it is possible to specify a callback that is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   142
invoked when the energy source is recharged (which might occur in case
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   143
an energy harvester is connected to the energy source). If such a
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   144
callback is not specified when the Wifi Radio Energy Model Helper is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   145
used to install the model on a device, a callback is implicitly made
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   146
so that the Wifi PHY is resumed from the SLEEP mode when the energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   147
source is recharged.
10883
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   148
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   149
Future Work
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   150
***********
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   151
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   152
For Device Energy Models, we are planning to include support for other
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   153
PHY layer models provided in ns-3 such as WiMAX, and to model the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   154
energy consumptions of other non communicating devices, like a generic
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   155
sensor and a CPU. For Energy Sources, we are planning to included new
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   156
types of Energy Sources such as Supercapacitor and Nickel-Metal
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   157
Hydride (Ni-MH) battery. For the Energy Harvesters, we are planning to
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   158
implement an energy harvester that recharges the energy sources
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   159
according to the power levels defined in a user customizable dataset
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   160
of real measurements.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   161
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   162
References
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   163
**********
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   164
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   165
.. [1] ns-2 Energy model:
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   166
   http://www.cubinlab.ee.unimelb.edu.au/~jrid/Docs/Manuel-NS2/node204.html
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   167
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   168
.. [2] H. Wu, S. Nabar and R. Poovendran. An Energy Framework for the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   169
   Network Simulator 3 (ns-3).
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   170
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   171
.. [3] M. Handy and D. Timmermann. Simulation of mobile wireless
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   172
   networks with accurate modelling of non-linear battery effects. In
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   173
   Proc. of Applied simulation and Modeling (ASM), 2003.
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   174
       
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   175
.. [4] D. N. Rakhmatov and S. B. Vrudhula. An analytical high-level
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   176
   battery model for use in energy management of portable electronic
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   177
   systems. In Proc. of IEEE/ACM International Conference on Computer
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   178
   Aided Design (ICCAD'01), pages 488-493, November 2001.
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   179
       
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   180
.. [5] D. N. Rakhmatov, S. B. Vrudhula, and D. A. Wallach. Battery
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   181
   lifetime prediction for energy-aware computing. In Proc. of the 2002
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   182
   International Symposium on Low Power Electronics and Design
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   183
   (ISLPED'02), pages 154-159, 2002.
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   184
       
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   185
.. [6] C. Tapparello, H. Ayatollahi and W. Heinzelman. Extending the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   186
   Energy Framework for Network Simulator 3 (ns-3). Workshop on ns-3
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   187
   (WNS3), Poster Session, Atlanta, GA, USA. May, 2014.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   188
11341
aba202c0c922 Added the LiIonEnergySource helper and RV Battery model bug fixes (Bug 1216)
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 11090
diff changeset
   189
.. [7] C. Tapparello, H. Ayatollahi and W. Heinzelman. Energy Harvesting 
aba202c0c922 Added the LiIonEnergySource helper and RV Battery model bug fixes (Bug 1216)
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 11090
diff changeset
   190
   Framework for Network Simulator 3 (ns-3). 2nd International Workshop on
aba202c0c922 Added the LiIonEnergySource helper and RV Battery model bug fixes (Bug 1216)
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 11090
diff changeset
   191
   Energy Neutral Sensing Systems (ENSsys), Memphis, TN, USA. November 6,
aba202c0c922 Added the LiIonEnergySource helper and RV Battery model bug fixes (Bug 1216)
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 11090
diff changeset
   192
   2014.
aba202c0c922 Added the LiIonEnergySource helper and RV Battery model bug fixes (Bug 1216)
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 11090
diff changeset
   193
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   194
Usage
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   195
=====
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   196
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   197
The main way that ns-3 users will typically interact with the Energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   198
Framework is through the helper API and through the publicly visible
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   199
attributes of the framework. The helper API is defined in
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   200
``src/energy/helper/*.h``.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   201
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   202
In order to use the energy framework, the user must install an Energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   203
Source for the node of interest, the corresponding Device Energy Model
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   204
for the network devices and, if necessary, the one or more Energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   205
Harvester. Energy Source (objects) are aggregated onto each node by
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   206
the Energy Source Helper. In order to allow multiple energy sources
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   207
per node, we aggregate an Energy Source Container rather than directly
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   208
aggregating a source object.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   209
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   210
The Energy Source object keeps a list of Device Energy Model and
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   211
Energy Harvester objects using the source as power supply. Device
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   212
Energy Model objects are installed onto the Energy Source by the
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   213
Device Energy Model Helper, while Energy Harvester object are
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   214
installed by the Energy Harvester Helper. User can access the Device
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   215
Energy Model objects through the Energy Source object to obtain energy
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   216
consumption information of individual devices. Moreover, the user can
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   217
access to the Energy Harvester objects in order to gather information
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   218
regarding the current harvestable power and the total energy harvested
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   219
by the harvester.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   220
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   221
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   222
Examples
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   223
********
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   224
7140
d203296efb63 Fix an example dependency problem and fix some paths in the documentation
Mitch Watrous <watrous@u.washington.edu>
parents: 6742
diff changeset
   225
The example directories, ``src/examples/energy`` and
d203296efb63 Fix an example dependency problem and fix some paths in the documentation
Mitch Watrous <watrous@u.washington.edu>
parents: 6742
diff changeset
   226
``examples/energy``, contain some basic code that shows how to set up
d203296efb63 Fix an example dependency problem and fix some paths in the documentation
Mitch Watrous <watrous@u.washington.edu>
parents: 6742
diff changeset
   227
the framework.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   228
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   229
Helpers
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   230
*******
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   231
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   232
Energy Source Helper
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   233
####################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   234
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   235
Base helper class for Energy Source objects, this helper Aggregates
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   236
Energy Source object onto a node. Child implementation of this class
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   237
creates the actual Energy Source object.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   238
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   239
Device Energy Model Helper
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   240
##########################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   241
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   242
Base helper class for Device Energy Model objects, this helper
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   243
attaches Device Energy Model objects onto Energy Source objects. Child
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   244
implementation of this class creates the actual Device Energy Model
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   245
object.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   246
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   247
Energy Harvesting Helper
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   248
##########################
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   249
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   250
Base helper class for Energy Harvester objects, this helper attaches
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   251
Energy Harvester objects onto Energy Source objects. Child
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   252
implementation of this class creates the actual Energy Harvester
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   253
object.
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   254
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   255
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   256
Attributes
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   257
**********
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   258
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   259
Attributes differ between Energy Sources, Devices Energy Models and
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   260
Energy Harvesters implementations, please look at the specific child
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   261
class for details.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   262
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   263
Basic Energy Source
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   264
###################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   265
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   266
* ``BasicEnergySourceInitialEnergyJ``: Initial energy stored in
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   267
  basic energy source.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   268
* ``BasicEnergySupplyVoltageV``: Initial supply voltage for basic energy source.
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   269
* ``PeriodicEnergyUpdateInterval``: Time between two consecutive periodic
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   270
  energy updates.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   271
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   272
RV Battery Model
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   273
################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   274
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   275
* ``RvBatteryModelPeriodicEnergyUpdateInterval``: RV battery model sampling
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   276
  interval.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   277
* ``RvBatteryModelOpenCircuitVoltage``: RV battery model open circuit voltage.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   278
* ``RvBatteryModelCutoffVoltage``: RV battery model cutoff voltage.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   279
* ``RvBatteryModelAlphaValue``: RV battery model alpha value.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   280
* ``RvBatteryModelBetaValue``: RV battery model beta value.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   281
* ``RvBatteryModelNumOfTerms``: The number of terms of the infinite sum for estimating battery level.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   282
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   283
WiFi Radio Energy Model
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   284
#######################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   285
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   286
* ``IdleCurrentA``: The default radio Idle current in Ampere.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   287
* ``CcaBusyCurrentA``: The default radio CCA Busy State current in Ampere.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   288
* ``TxCurrentA``: The radio Tx current in Ampere.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   289
* ``RxCurrentA``: The radio Rx current in Ampere.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   290
* ``SwitchingCurrentA``: The default radio Channel Switch current in Ampere.
10883
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   291
* ``SleepCurrentA``: The radio Sleep current in Ampere.
d919e7194e23 add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents: 10882
diff changeset
   292
* ``TxCurrentModel``: A pointer to the attached tx current model.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   293
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   294
Basic Energy Harvester
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   295
#######################
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   296
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   297
* ``PeriodicHarvestedPowerUpdateInterval``: Time between two consecutive
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   298
  periodic updates of the harvested power.
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   299
* ``HarvestablePower``: Random variables that represents the amount of power
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   300
  that is provided by the energy harvester.
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   301
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   302
Tracing
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   303
*******
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   304
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   305
Traced values differ between Energy Sources, Devices Energy Models and
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   306
Energy Harvesters implementations, please look at the specific child
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   307
class for details.
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   308
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   309
Basic Energy Source
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   310
###################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   311
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   312
* ``RemainingEnergy``: Remaining energy at BasicEnergySource.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   313
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   314
RV Battery Model
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   315
################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   316
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   317
* ``RvBatteryModelBatteryLevel``: RV battery model battery level.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   318
* ``RvBatteryModelBatteryLifetime``: RV battery model battery lifetime.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   319
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   320
WiFi Radio Energy Model
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   321
#######################
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   322
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   323
* ``TotalEnergyConsumption``: Total energy consumption of the radio device.
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   324
10882
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   325
Basic Energy Harvester
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   326
#######################
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   327
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   328
* ``HarvestedPower``: Current power provided by the BasicEnergyHarvester.
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   329
* ``TotalEnergyHarvested``: Total energy harvested by the BasicEnergyHarvester.
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   330
75e256e51d9d Energy harvester model
Cristiano Tapparello <cristiano.tapparello@rochester.edu>
parents: 7204
diff changeset
   331
6742
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   332
Validation
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   333
**********
a1759a95842c convert manual to sphinx format
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   334
11090
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   335
Comparison of the Energy Framework against actual devices have not
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   336
been performed. Current implementation of the Energy Framework is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   337
checked numerically for computation errors. The RV battery model is
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   338
validated by comparing results with what was presented in the original
ae11bb28818a [Sphinx] Minor corrections, fix errors in energy.rst
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10883
diff changeset
   339
RV battery model paper.