A Discrete-Event Network Simulator
API
ns3::LteUePowerControl Class Reference

This class realizes Uplink Power Control functionality. More...

#include "lte-ue-power-control.h"

+ Inheritance diagram for ns3::LteUePowerControl:
+ Collaboration diagram for ns3::LteUePowerControl:

Public Types

typedef void(* TxPowerTracedCallback) (uint16_t cellId, uint16_t rnti, double power)
 TracedCallback signature for uplink transmit power. More...
 

Public Member Functions

 LteUePowerControl ()
 
virtual ~LteUePowerControl ()
 
void CalculatePucchTxPower ()
 
void CalculatePuschTxPower ()
 
void CalculateSrsTxPower ()
 
void ConfigureReferenceSignalPower (int8_t referenceSignalPower)
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
double GetPcmax ()
 
double GetPucchTxPower (std::vector< int > rb)
 
double GetPuschTxPower (std::vector< int > rb)
 
double GetSrsTxPower (std::vector< int > rb)
 
void ReportTpc (uint8_t tpc)
 
void SetAlpha (double value)
 
void SetCellId (uint16_t cellId)
 
void SetPcmax (double value)
 
void SetPoNominalPusch (int16_t value)
 
void SetPoUePusch (int16_t value)
 
void SetRnti (uint16_t rnti)
 
void SetRsrp (double value)
 
void SetTxPower (double value)
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Implement the GetInstanceTypeId method defined in ObjectBase. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

void SetSubChannelMask (std::vector< int > mask)
 

Private Attributes

bool m_accumulationEnabled
 
std::vector< double > m_alpha
 
uint16_t m_cellId
 
bool m_closedLoop
 
double m_curPucchTxPower
 
double m_curPuschTxPower
 
double m_curSrsTxPower
 
std::vector< int8_t > m_deltaPusch
 
double m_deltaTF
 
double m_fc
 
uint16_t m_M_Pusch
 
double m_pathLoss
 
double m_Pcmax
 
double m_Pcmin
 
std::vector< int16_t > m_PoNominalPusch
 
std::vector< int16_t > m_PoUePusch
 
int16_t m_PsrsOffset
 
double m_referenceSignalPower
 
TracedCallback< uint16_t, uint16_t, double > m_reportPucchTxPower
 
TracedCallback< uint16_t, uint16_t, double > m_reportPuschTxPower
 Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower. More...
 
TracedCallback< uint16_t, uint16_t, double > m_reportSrsTxPower
 
uint16_t m_rnti
 
double m_rsrp
 
bool m_rsrpSet
 
uint16_t m_srsBandwidth
 
double m_txPower
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

This class realizes Uplink Power Control functionality.

Introspection did not find any typical Config paths.

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


Attributes

  • ClosedLoop: If true Closed Loop mode will be active, otherwise Open Loop
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • AccumulationEnabled: If true TCP accumulation mode will be active, otherwise absolute mode will be active
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • Alpha: Value of Alpha paramter
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1
    • Flags: construct write
  • Pcmax: Max Transmission power in dBm, Default value 23 dBmTS36.101 section 6.2.3
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 23
    • Flags: construct write read
  • Pcmin: Min Transmission power in dBm, Default value -40 dBmTS36.101 section 6.2.3
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -40
    • Flags: construct write read
  • PoNominalPusch: P_O_NOMINAL_PUSCH INT (-126 ... 24), Default value -80
    • Set with class: ns3::IntegerValue
    • Underlying type: int16_t -32768:32767
    • Initial value: -80
    • Flags: construct write
  • PoUePusch: P_O_UE_PUSCH INT(-8...7), Default value 0
    • Set with class: ns3::IntegerValue
    • Underlying type: int16_t -32768:32767
    • Initial value: 0
    • Flags: construct write
  • PsrsOffset: P_SRS_OFFSET INT(0...15), Default value 7
    • Set with class: ns3::IntegerValue
    • Underlying type: int16_t -32768:32767
    • Initial value: 7
    • Flags: construct write read

TraceSources

Size of this type is 288 bytes (on a 64-bit architecture).

Definition at line 54 of file lte-ue-power-control.h.

Member Typedef Documentation

typedef void(* ns3::LteUePowerControl::TxPowerTracedCallback) (uint16_t cellId, uint16_t rnti, double power)

TracedCallback signature for uplink transmit power.

Parameters
[in]cellIdCell identifier.
[in]rntiThe C-RNTI identifying the UE.
[in]powerThe current TX power.

Definition at line 98 of file lte-ue-power-control.h.

Constructor & Destructor Documentation

ns3::LteUePowerControl::LteUePowerControl ( )
ns3::LteUePowerControl::~LteUePowerControl ( )
virtual

Definition at line 53 of file lte-ue-power-control.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::LteUePowerControl::CalculatePucchTxPower ( )

Definition at line 390 of file lte-ue-power-control.cc.

References m_curPucchTxPower, m_curPuschTxPower, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by GetPucchTxPower().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::CalculatePuschTxPower ( )

Definition at line 362 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().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::CalculateSrsTxPower ( )

Definition at line 398 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().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::ConfigureReferenceSignalPower ( int8_t  referenceSignalPower)

Definition at line 160 of file lte-ue-power-control.cc.

References m_referenceSignalPower, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::DoConfigureReferenceSignalPower().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::DoDispose ( void  )
virtual

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 overriden 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 65 of file lte-ue-power-control.cc.

References NS_LOG_FUNCTION.

void ns3::LteUePowerControl::DoInitialize ( void  )
virtual

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 59 of file lte-ue-power-control.cc.

References NS_LOG_FUNCTION.

double ns3::LteUePowerControl::GetPcmax ( )

Definition at line 143 of file lte-ue-power-control.cc.

References m_Pcmax, and NS_LOG_FUNCTION.

double ns3::LteUePowerControl::GetPucchTxPower ( std::vector< int >  rb)

Definition at line 435 of file lte-ue-power-control.cc.

References CalculatePucchTxPower(), m_cellId, m_curPucchTxPower, m_reportPucchTxPower, m_rnti, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SubframeIndication().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::LteUePowerControl::GetPuschTxPower ( std::vector< int >  rb)

Definition at line 422 of file lte-ue-power-control.cc.

References CalculatePuschTxPower(), m_cellId, m_curPuschTxPower, m_M_Pusch, m_reportPuschTxPower, m_rnti, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SubframeIndication().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::LteUePowerControl::GetSrsTxPower ( std::vector< int >  rb)

Definition at line 447 of file lte-ue-power-control.cc.

References CalculateSrsTxPower(), m_cellId, m_curSrsTxPower, m_reportSrsTxPower, m_rnti, m_srsBandwidth, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SendSrs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::ReportTpc ( uint8_t  tpc)
void ns3::LteUePowerControl::SetAlpha ( double  value)

Definition at line 216 of file lte-ue-power-control.cc.

References m_alpha, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::SetCellId ( uint16_t  cellId)

Definition at line 167 of file lte-ue-power-control.cc.

References m_cellId, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::DoSetRnti().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::SetPcmax ( double  value)

Definition at line 136 of file lte-ue-power-control.cc.

References m_Pcmax, and NS_LOG_FUNCTION.

void ns3::LteUePowerControl::SetPoNominalPusch ( int16_t  value)

Definition at line 180 of file lte-ue-power-control.cc.

References m_PoNominalPusch, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::SetPoUePusch ( int16_t  value)

Definition at line 199 of file lte-ue-power-control.cc.

References m_PoUePusch, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::SetRnti ( uint16_t  rnti)

Definition at line 173 of file lte-ue-power-control.cc.

References m_rnti, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::DoSetRnti().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::SetRsrp ( double  value)

Definition at line 252 of file lte-ue-power-control.cc.

References m_pathLoss, m_referenceSignalPower, m_rsrp, m_rsrpSet, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::ReportRsReceivedPower().

+ Here is the caller graph for this function:

void ns3::LteUePowerControl::SetSubChannelMask ( std::vector< int >  mask)
private

Definition at line 355 of file lte-ue-power-control.cc.

References m_M_Pusch, and NS_LOG_FUNCTION.

void ns3::LteUePowerControl::SetTxPower ( double  value)

Definition at line 150 of file lte-ue-power-control.cc.

References m_curPucchTxPower, m_curPuschTxPower, m_curSrsTxPower, m_txPower, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SetTxPower().

+ Here is the caller graph for this function:

Member Data Documentation

bool ns3::LteUePowerControl::m_accumulationEnabled
private

Definition at line 131 of file lte-ue-power-control.h.

Referenced by GetTypeId(), and ReportTpc().

std::vector<double> ns3::LteUePowerControl::m_alpha
private

Definition at line 121 of file lte-ue-power-control.h.

Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and SetAlpha().

uint16_t ns3::LteUePowerControl::m_cellId
private
bool ns3::LteUePowerControl::m_closedLoop
private

Definition at line 130 of file lte-ue-power-control.h.

Referenced by GetTypeId(), and ReportTpc().

double ns3::LteUePowerControl::m_curPucchTxPower
private
double ns3::LteUePowerControl::m_curPuschTxPower
private
double ns3::LteUePowerControl::m_curSrsTxPower
private
std::vector<int8_t> ns3::LteUePowerControl::m_deltaPusch
private

Definition at line 125 of file lte-ue-power-control.h.

Referenced by ReportTpc().

double ns3::LteUePowerControl::m_deltaTF
private
double ns3::LteUePowerControl::m_fc
private
uint16_t ns3::LteUePowerControl::m_M_Pusch
private
double ns3::LteUePowerControl::m_pathLoss
private
double ns3::LteUePowerControl::m_Pcmax
private
double ns3::LteUePowerControl::m_Pcmin
private
std::vector<int16_t> ns3::LteUePowerControl::m_PoNominalPusch
private
std::vector<int16_t> ns3::LteUePowerControl::m_PoUePusch
private
int16_t ns3::LteUePowerControl::m_PsrsOffset
private

Definition at line 118 of file lte-ue-power-control.h.

Referenced by CalculateSrsTxPower(), and GetTypeId().

double ns3::LteUePowerControl::m_referenceSignalPower
private

Definition at line 111 of file lte-ue-power-control.h.

Referenced by ConfigureReferenceSignalPower(), and SetRsrp().

TracedCallback<uint16_t, uint16_t, double> ns3::LteUePowerControl::m_reportPucchTxPower
private

Definition at line 140 of file lte-ue-power-control.h.

Referenced by GetPucchTxPower(), and GetTypeId().

TracedCallback<uint16_t, uint16_t, double> ns3::LteUePowerControl::m_reportPuschTxPower
private

Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.

Definition at line 139 of file lte-ue-power-control.h.

Referenced by GetPuschTxPower(), and GetTypeId().

TracedCallback<uint16_t, uint16_t, double> ns3::LteUePowerControl::m_reportSrsTxPower
private

Definition at line 141 of file lte-ue-power-control.h.

Referenced by GetSrsTxPower(), and GetTypeId().

uint16_t ns3::LteUePowerControl::m_rnti
private
double ns3::LteUePowerControl::m_rsrp
private

Definition at line 113 of file lte-ue-power-control.h.

Referenced by SetRsrp().

bool ns3::LteUePowerControl::m_rsrpSet
private

Definition at line 112 of file lte-ue-power-control.h.

Referenced by LteUePowerControl(), and SetRsrp().

uint16_t ns3::LteUePowerControl::m_srsBandwidth
private

Definition at line 128 of file lte-ue-power-control.h.

Referenced by CalculateSrsTxPower(), and GetSrsTxPower().

double ns3::LteUePowerControl::m_txPower
private

Definition at line 103 of file lte-ue-power-control.h.

Referenced by LteUePowerControl(), and SetTxPower().


The documentation for this class was generated from the following files: