ns-3
|
Rakhmatov Vrudhula non-linear battery model. More...
#include <rv-battery-model.h>
Public Member Functions | |
virtual double | GetInitialEnergy (void) const |
virtual double | GetSupplyVoltage (void) const |
virtual double | GetRemainingEnergy (void) |
virtual double | GetEnergyFraction (void) |
virtual void | UpdateEnergySource (void) |
void | SetSamplingInterval (Time interval) |
Time | GetSamplingInterval (void) const |
void | SetOpenCircuitVoltage (double voltage) |
Sets open circuit voltage of battery. | |
double | GetOpenCircuitVoltage (void) const |
void | SetCutoffVoltage (double voltage) |
Sets cutoff voltage of battery. | |
double | GetCutoffVoltage (void) const |
void | SetAlpha (double alpha) |
Sets the alpha value for the battery model. | |
double | GetAlpha (void) const |
void | SetBeta (double beta) |
Sets the beta value for the battery model. | |
double | GetBeta (void) const |
double | GetBatteryLevel (void) |
Time | GetLifetime (void) const |
void | SetNumOfTerms (int num) |
Sets the number of terms of the infinite sum for estimating battery level. | |
int | GetNumOfTerms (void) const |
![]() | |
void | SetNode (Ptr< Node > node) |
Sets pointer to node containing this EnergySource. | |
Ptr< Node > | GetNode (void) const |
void | AppendDeviceEnergyModel (Ptr< DeviceEnergyModel > deviceEnergyModelPtr) |
DeviceEnergyModelContainer | FindDeviceEnergyModels (TypeId tid) |
DeviceEnergyModelContainer | FindDeviceEnergyModels (std::string name) |
void | StartDeviceModels (void) |
void | DisposeDeviceModels (void) |
![]() | |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Dispose (void) |
void | AggregateObject (Ptr< Object > other) |
AggregateIterator | GetAggregateIterator (void) const |
void | Start (void) |
![]() | |
SimpleRefCount (const SimpleRefCount &o) | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
uint32_t | GetReferenceCount (void) const |
![]() | |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::RvBatteryModel. |
Additional Inherited Members | |
![]() | |
double | CalculateTotalCurrent (void) |
void | NotifyEnergyDrained (void) |
void | BreakDeviceEnergyModelRefCycle (void) |
![]() | |
virtual void | NotifyNewAggregate (void) |
Object (const Object &o) |
Rakhmatov Vrudhula non-linear battery model.
This (energy source) model implements an analytical non-linear battery model. It is capable of capturing load capacity and recovery effects of batteries. Batteries are characterized by 2 parameters, alpha and beta, which can both be obtained from the discharge curve of the batteries.
The model is developed by Daler Rakhmatov & Sarma Vrudhula in: "Battery Lifetime Prediction for Energy-Aware Computing" and "An Analytical High-Level Battery Model for Use in Energy Management of Portable Electronic Systems".
The real-time algorithm is developed by Matthias Handy & Dirk Timmermann in: "Simulation of Mobile Wireless Networks with Accurate Modeling of non-linear battery effects". The real-time algorithm is modified by the authors of this code for improved accuracy and reduced computation (sampling) overhead.
double ns3::RvBatteryModel::GetAlpha | ( | void | ) | const |
Referenced by GetTypeId().
double ns3::RvBatteryModel::GetBatteryLevel | ( | void | ) |
References NS_LOG_FUNCTION, and UpdateEnergySource().
Referenced by GetEnergyFraction().
double ns3::RvBatteryModel::GetBeta | ( | void | ) | const |
Referenced by GetTypeId().
double ns3::RvBatteryModel::GetCutoffVoltage | ( | void | ) | const |
Referenced by GetTypeId().
|
virtual |
Implements GetEnergyFraction. For the RV battery model, energy fraction is equivalent to battery level.
Implements ns3::EnergySource.
References GetBatteryLevel().
|
virtual |
Implements GetInitialEnergy.
Implements ns3::EnergySource.
References GetSupplyVoltage().
Time ns3::RvBatteryModel::GetLifetime | ( | void | ) | const |
int ns3::RvBatteryModel::GetNumOfTerms | ( | void | ) | const |
Referenced by GetTypeId().
double ns3::RvBatteryModel::GetOpenCircuitVoltage | ( | void | ) | const |
Referenced by GetTypeId().
|
virtual |
Implements GetRemainingEnergy.
Implements ns3::EnergySource.
References GetSupplyVoltage(), NS_LOG_FUNCTION, and UpdateEnergySource().
Time ns3::RvBatteryModel::GetSamplingInterval | ( | void | ) | const |
Referenced by GetTypeId().
|
virtual |
Implements GetSupplyVoltage.
Implements ns3::EnergySource.
Referenced by GetInitialEnergy(), and GetRemainingEnergy().
|
static |
This method returns the TypeId associated to ns3::RvBatteryModel.
Attributes defined for this type:
TraceSources defined for this type:
Reimplemented from ns3::EnergySource.
References GetAlpha(), GetBeta(), GetCutoffVoltage(), GetNumOfTerms(), GetOpenCircuitVoltage(), GetSamplingInterval(), ns3::MakeTraceSourceAccessor(), ns3::Seconds(), SetAlpha(), SetBeta(), SetCutoffVoltage(), SetNumOfTerms(), SetOpenCircuitVoltage(), ns3::TypeId::SetParent(), and SetSamplingInterval().
void ns3::RvBatteryModel::SetAlpha | ( | double | alpha | ) |
Sets the alpha value for the battery model.
alpha | Alpha. |
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::RvBatteryModel::SetBeta | ( | double | beta | ) |
Sets the beta value for the battery model.
beta | Beta. |
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::RvBatteryModel::SetCutoffVoltage | ( | double | voltage | ) |
Sets cutoff voltage of battery.
voltage | Cutoff voltage. |
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::RvBatteryModel::SetNumOfTerms | ( | int | num | ) |
Sets the number of terms of the infinite sum for estimating battery level.
num | Number of terms. |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::RvBatteryModel::SetOpenCircuitVoltage | ( | double | voltage | ) |
Sets open circuit voltage of battery.
voltage | Open circuit voltage. |
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::RvBatteryModel::SetSamplingInterval | ( | Time | interval | ) |
interval | Energy update interval. |
This function sets the interval between each energy update.
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
virtual |
Implements UpdateEnergySource. This function samples the total load (total current) from all devices to discharge the battery.
Implements ns3::EnergySource.
References ns3::EnergySource::CalculateTotalCurrent(), ns3::EventId::Cancel(), ns3::Simulator::IsFinished(), ns3::Now(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by GetBatteryLevel(), and GetRemainingEnergy().