|
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 |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| This method returns the TypeId associated to ns3::RvBatteryModel. | |
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().
| double ns3::RvBatteryModel::GetEnergyFraction | ( | void | ) | [virtual] |
Implements GetEnergyFraction. For the RV battery model, energy fraction is equivalent to battery level.
Implements ns3::EnergySource.
References GetBatteryLevel().
| double ns3::RvBatteryModel::GetInitialEnergy | ( | void | ) | const [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().
| double ns3::RvBatteryModel::GetRemainingEnergy | ( | void | ) | [virtual] |
Implements GetRemainingEnergy.
Implements ns3::EnergySource.
References GetSupplyVoltage(), NS_LOG_FUNCTION, and UpdateEnergySource().
| Time ns3::RvBatteryModel::GetSamplingInterval | ( | void | ) | const |
Referenced by GetTypeId().
| double ns3::RvBatteryModel::GetSupplyVoltage | ( | void | ) | const [virtual] |
Implements GetSupplyVoltage.
Implements ns3::EnergySource.
Referenced by GetInitialEnergy(), and GetRemainingEnergy().
| TypeId ns3::RvBatteryModel::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::RvBatteryModel.
This object is accessible through the following paths with Config::Set and Config::Connect:
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().
| void ns3::RvBatteryModel::UpdateEnergySource | ( | void | ) | [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().