This class realizes Uplink Power Control functionality. More...
#include "lte-ue-power-control.h"
Public Types | |
typedef void(* | TxPowerTracedCallback) (uint16_t cellId, uint16_t rnti, double power) |
TracedCallback signature for uplink transmit power. | |
Public Member Functions | |
LteUePowerControl () | |
~LteUePowerControl () override | |
void | CalculatePucchTxPower () |
Calculate PUCCH transmit power function. | |
void | CalculatePuschTxPower () |
Calculate PUSCH transmit power function. | |
void | CalculateSrsTxPower () |
Calculate SRS transmit power function. | |
void | ConfigureReferenceSignalPower (int8_t referenceSignalPower) |
Configure reference signal power (dBm) function. | |
void | DoDispose () override |
Destructor implementation. | |
void | DoInitialize () override |
Initialize() implementation. | |
double | GetPcmax () |
Get PC maximum function. | |
double | GetPucchTxPower (std::vector< int > rb) |
Get PUCCH transmit power function. | |
double | GetPuschTxPower (std::vector< int > rb) |
Get PUSCH transmit power function. | |
double | GetSrsTxPower (std::vector< int > rb) |
Get SRS transmit power function. | |
void | ReportTpc (uint8_t tpc) |
Set RSRP function. | |
void | SetAlpha (double value) |
Set alpha function. | |
void | SetCellId (uint16_t cellId) |
Set the cell ID function. | |
void | SetPcmax (double value) |
Set PC maximum function. | |
void | SetPoNominalPusch (int16_t value) |
Set PO nominal PUSCH function. | |
void | SetPoUePusch (int16_t value) |
Set PO UE PUSCH function. | |
void | SetRnti (uint16_t rnti) |
Set the RNTI function. | |
void | SetRsrp (double value) |
Set RSRP function. | |
void | SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient) |
Set RSRP function. | |
void | SetTxPower (double value) |
Set transmit power function. | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
Private Member Functions | |
void | SetSubChannelMask (std::vector< int > mask) |
Set subchannel mask function. | |
Private Attributes | |
bool | m_accumulationEnabled |
accumulation enabled | |
std::vector< double > | m_alpha |
alpha values | |
uint16_t | m_cellId |
cell ID | |
bool | m_closedLoop |
is closed loop | |
double | m_curPucchTxPower |
current PUCCH transmit power | |
double | m_curPuschTxPower |
current PUSCH transmit power | |
double | m_curSrsTxPower |
current SRS transmit power | |
std::vector< int8_t > | m_deltaPusch |
delta PUSCH | |
double | m_deltaTF |
delta TF | |
double | m_fc |
FC. | |
uint16_t | m_M_Pusch |
size of DL RB list | |
double | m_pathLoss |
path loss value in dB | |
double | m_Pcmax |
PC maximum. | |
double | m_Pcmin |
PC minimum. | |
uint8_t | m_pcRsrpFilterCoefficient |
The RsrpFilterCoefficient attribute. | |
std::vector< int16_t > | m_PoNominalPusch |
PO nominal PUSCH. | |
std::vector< int16_t > | m_PoUePusch |
PO US PUSCH. | |
int16_t | m_PsrsOffset |
PSRS offset. | |
double | m_referenceSignalPower |
reference signal power in dBm | |
TracedCallback< uint16_t, uint16_t, double > | m_reportPucchTxPower |
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower. | |
TracedCallback< uint16_t, uint16_t, double > | m_reportPuschTxPower |
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower. | |
TracedCallback< uint16_t, uint16_t, double > | m_reportSrsTxPower |
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower. | |
uint16_t | m_rnti |
RNTI. | |
double | m_rsrp |
RSRP value in dBm. | |
bool | m_rsrpSet |
is RSRP set? | |
uint16_t | m_srsBandwidth |
SRS bandwidth. | |
double | m_txPower |
transmit power | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
This class realizes Uplink Power Control functionality.
When LteUePhy is about sending PUSCH/PUCCH/SRS it should ask LteUePowerControl for current channel TX power level and then use it while creating SpectrumValue for Uplink Transmission
LteUePowerControl computes TX power level for PUSCH and SRS. PUCCH is realized in ideal way and PUSCH do not use any resources, so there is no need to compute power for that channel
LteUePowerControlcomputes TX power based on some preconfigured parameters and current Path-loss. Path-loss is computed as difference between current RSRP and referenceSignalPower level. Current RSRP is passed to LteUePowerControl by LteUePhy. referenceSignalPower is configurable by attribute system
Moreover, LteUePhy pass all received TPC values to LteUePowerControl, what is a part of Closed Loop Power Control functionality
Definition at line 43 of file lte-ue-power-control.h.
typedef void(* ns3::LteUePowerControl::TxPowerTracedCallback) (uint16_t cellId, uint16_t rnti, double power) |
TracedCallback signature for uplink transmit power.
[in] | cellId | Cell identifier. |
[in] | rnti | The C-RNTI identifying the UE. |
[in] | power | The current TX power. |
Definition at line 174 of file lte-ue-power-control.h.
ns3::LteUePowerControl::LteUePowerControl | ( | ) |
Definition at line 25 of file lte-ue-power-control.cc.
References m_cellId, m_curPucchTxPower, m_curPuschTxPower, m_curSrsTxPower, m_deltaTF, m_fc, m_M_Pusch, m_pathLoss, m_pcRsrpFilterCoefficient, m_rnti, m_rsrpSet, m_txPower, and NS_LOG_FUNCTION.
|
override |
Definition at line 44 of file lte-ue-power-control.cc.
References NS_LOG_FUNCTION.
void ns3::LteUePowerControl::CalculatePucchTxPower | ( | ) |
Calculate PUCCH transmit power function.
Definition at line 393 of file lte-ue-power-control.cc.
References m_curPucchTxPower, m_curPuschTxPower, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetPucchTxPower().
void ns3::LteUePowerControl::CalculatePuschTxPower | ( | ) |
Calculate PUSCH transmit power function.
Definition at line 363 of file lte-ue-power-control.cc.
References m_alpha, m_curPuschTxPower, m_deltaTF, m_fc, m_M_Pusch, m_pathLoss, m_Pcmax, m_Pcmin, m_PoNominalPusch, m_PoUePusch, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetPuschTxPower().
void ns3::LteUePowerControl::CalculateSrsTxPower | ( | ) |
Calculate SRS transmit power function.
Definition at line 401 of file lte-ue-power-control.cc.
References m_alpha, m_curSrsTxPower, m_deltaTF, m_fc, m_M_Pusch, m_pathLoss, m_Pcmax, m_Pcmin, m_PoNominalPusch, m_PoUePusch, m_PsrsOffset, m_srsBandwidth, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetSrsTxPower().
void ns3::LteUePowerControl::ConfigureReferenceSignalPower | ( | int8_t | referenceSignalPower | ) |
Configure reference signal power (dBm) function.
referenceSignalPower | the reference signal power |
Definition at line 152 of file lte-ue-power-control.cc.
References m_referenceSignalPower, and NS_LOG_FUNCTION.
|
overridevirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 56 of file lte-ue-power-control.cc.
References NS_LOG_FUNCTION.
|
overridevirtual |
Initialize() implementation.
This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 50 of file lte-ue-power-control.cc.
References NS_LOG_FUNCTION.
double ns3::LteUePowerControl::GetPcmax | ( | ) |
Get PC maximum function.
Definition at line 135 of file lte-ue-power-control.cc.
References m_Pcmax, and NS_LOG_FUNCTION.
double ns3::LteUePowerControl::GetPucchTxPower | ( | std::vector< int > | rb | ) |
Get PUCCH transmit power function.
rb | unused |
Definition at line 438 of file lte-ue-power-control.cc.
References CalculatePucchTxPower(), m_cellId, m_curPucchTxPower, m_reportPucchTxPower, m_rnti, and NS_LOG_FUNCTION.
double ns3::LteUePowerControl::GetPuschTxPower | ( | std::vector< int > | rb | ) |
Get PUSCH transmit power function.
rb | the DL RB list |
Definition at line 425 of file lte-ue-power-control.cc.
References CalculatePuschTxPower(), m_cellId, m_curPuschTxPower, m_M_Pusch, m_reportPuschTxPower, m_rnti, and NS_LOG_FUNCTION.
double ns3::LteUePowerControl::GetSrsTxPower | ( | std::vector< int > | rb | ) |
Get SRS transmit power function.
rb | the DL RB list |
Definition at line 450 of file lte-ue-power-control.cc.
References CalculateSrsTxPower(), m_cellId, m_curSrsTxPower, m_reportSrsTxPower, m_rnti, m_srsBandwidth, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 62 of file lte-ue-power-control.cc.
References m_accumulationEnabled, m_closedLoop, m_Pcmax, m_Pcmin, m_PsrsOffset, m_reportPucchTxPower, m_reportPuschTxPower, m_reportSrsTxPower, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeDoubleChecker(), ns3::MakeIntegerAccessor(), ns3::MakeIntegerChecker(), ns3::MakeTraceSourceAccessor(), SetAlpha(), ns3::TypeId::SetParent(), SetPoNominalPusch(), and SetPoUePusch().
void ns3::LteUePowerControl::ReportTpc | ( | uint8_t | tpc | ) |
Set RSRP function.
tpc | the TPC to report |
Definition at line 270 of file lte-ue-power-control.cc.
References m_accumulationEnabled, m_closedLoop, m_curPuschTxPower, m_deltaPusch, m_fc, m_Pcmax, m_Pcmin, NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_LOG_INFO.
void ns3::LteUePowerControl::SetAlpha | ( | double | value | ) |
Set alpha function.
value | the alpha value to set |
Definition at line 210 of file lte-ue-power-control.cc.
References m_alpha, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteUePowerControl::SetCellId | ( | uint16_t | cellId | ) |
Set the cell ID function.
cellId | the cell ID |
Definition at line 159 of file lte-ue-power-control.cc.
References m_cellId, and NS_LOG_FUNCTION.
void ns3::LteUePowerControl::SetPcmax | ( | double | value | ) |
Set PC maximum function.
value | the PC maximum value |
Definition at line 128 of file lte-ue-power-control.cc.
References m_Pcmax, and NS_LOG_FUNCTION.
void ns3::LteUePowerControl::SetPoNominalPusch | ( | int16_t | value | ) |
Set PO nominal PUSCH function.
value | the value to set |
Definition at line 173 of file lte-ue-power-control.cc.
References m_PoNominalPusch, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteUePowerControl::SetPoUePusch | ( | int16_t | value | ) |
Set PO UE PUSCH function.
value | the value to set |
Definition at line 192 of file lte-ue-power-control.cc.
References m_PoUePusch, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteUePowerControl::SetRnti | ( | uint16_t | rnti | ) |
Set the RNTI function.
rnti | the RNTI |
Definition at line 166 of file lte-ue-power-control.cc.
References m_rnti, and NS_LOG_FUNCTION.
void ns3::LteUePowerControl::SetRsrp | ( | double | value | ) |
Set RSRP function.
value | the RSRP (dBm) value to set |
Definition at line 245 of file lte-ue-power-control.cc.
References m_pathLoss, m_pcRsrpFilterCoefficient, m_referenceSignalPower, m_rsrp, m_rsrpSet, and NS_LOG_FUNCTION.
void ns3::LteUePowerControl::SetRsrpFilterCoefficient | ( | uint8_t | rsrpFilterCoefficient | ) |
Set RSRP function.
rsrpFilterCoefficient | value. Determines the strength of smoothing effect induced by layer 3 filtering of RSRP used for uplink power control in all attached UE. If equals to 0, no layer 3 filtering is applicable. |
Definition at line 263 of file lte-ue-power-control.cc.
References m_pcRsrpFilterCoefficient, and NS_LOG_FUNCTION.
|
private |
Set subchannel mask function.
[in] | mask | the subchannel mask |
Definition at line 356 of file lte-ue-power-control.cc.
References m_M_Pusch, and NS_LOG_FUNCTION.
void ns3::LteUePowerControl::SetTxPower | ( | double | value | ) |
Set transmit power function.
value | the transmit power value |
Definition at line 142 of file lte-ue-power-control.cc.
References m_curPucchTxPower, m_curPuschTxPower, m_curSrsTxPower, m_txPower, and NS_LOG_FUNCTION.
|
private |
accumulation enabled
Definition at line 212 of file lte-ue-power-control.h.
Referenced by GetTypeId(), and ReportTpc().
|
private |
alpha values
Definition at line 202 of file lte-ue-power-control.h.
Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and SetAlpha().
|
private |
cell ID
Definition at line 214 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), GetPucchTxPower(), GetPuschTxPower(), GetSrsTxPower(), and SetCellId().
|
private |
is closed loop
Definition at line 211 of file lte-ue-power-control.h.
Referenced by GetTypeId(), and ReportTpc().
|
private |
current PUCCH transmit power
Definition at line 189 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), CalculatePucchTxPower(), GetPucchTxPower(), and SetTxPower().
|
private |
current PUSCH transmit power
Definition at line 188 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), CalculatePucchTxPower(), CalculatePuschTxPower(), GetPuschTxPower(), ReportTpc(), and SetTxPower().
|
private |
current SRS transmit power
Definition at line 190 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), CalculateSrsTxPower(), GetSrsTxPower(), and SetTxPower().
|
private |
|
private |
delta TF
Definition at line 204 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), CalculatePuschTxPower(), and CalculateSrsTxPower().
|
private |
FC.
Definition at line 207 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), CalculatePuschTxPower(), CalculateSrsTxPower(), and ReportTpc().
|
private |
size of DL RB list
Definition at line 201 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), CalculatePuschTxPower(), CalculateSrsTxPower(), GetPuschTxPower(), and SetSubChannelMask().
|
private |
path loss value in dB
Definition at line 203 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), CalculatePuschTxPower(), CalculateSrsTxPower(), and SetRsrp().
|
private |
PC maximum.
Definition at line 185 of file lte-ue-power-control.h.
Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), GetPcmax(), GetTypeId(), ReportTpc(), and SetPcmax().
|
private |
PC minimum.
Definition at line 186 of file lte-ue-power-control.h.
Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), GetTypeId(), and ReportTpc().
|
private |
The RsrpFilterCoefficient
attribute.
Determines the strength of smoothing effect induced by layer 3 filtering of RSRP in all attached UE. If equals to 0, no layer 3 filtering is applicable.
Definition at line 221 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), SetRsrp(), and SetRsrpFilterCoefficient().
|
private |
PO nominal PUSCH.
Definition at line 196 of file lte-ue-power-control.h.
Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and SetPoNominalPusch().
|
private |
PO US PUSCH.
Definition at line 197 of file lte-ue-power-control.h.
Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and SetPoUePusch().
|
private |
PSRS offset.
Definition at line 199 of file lte-ue-power-control.h.
Referenced by CalculateSrsTxPower(), and GetTypeId().
|
private |
reference signal power in dBm
Definition at line 192 of file lte-ue-power-control.h.
Referenced by ConfigureReferenceSignalPower(), and SetRsrp().
|
private |
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.
Definition at line 231 of file lte-ue-power-control.h.
Referenced by GetPucchTxPower(), and GetTypeId().
|
private |
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.
Definition at line 226 of file lte-ue-power-control.h.
Referenced by GetPuschTxPower(), and GetTypeId().
|
private |
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.
Definition at line 236 of file lte-ue-power-control.h.
Referenced by GetSrsTxPower(), and GetTypeId().
|
private |
RNTI.
Definition at line 215 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), GetPucchTxPower(), GetPuschTxPower(), GetSrsTxPower(), and SetRnti().
|
private |
|
private |
is RSRP set?
Definition at line 193 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), and SetRsrp().
|
private |
SRS bandwidth.
Definition at line 209 of file lte-ue-power-control.h.
Referenced by CalculateSrsTxPower(), and GetSrsTxPower().
|
private |
transmit power
Definition at line 184 of file lte-ue-power-control.h.
Referenced by LteUePowerControl(), and SetTxPower().