ns3::SatLooModel Class Reference

Class for Loo's model fader. More...

#include "satellite-loo-model.h"

+ Inheritance diagram for ns3::SatLooModel:
+ Collaboration diagram for ns3::SatLooModel:

Public Member Functions

 SatLooModel ()
 Constructor. More...
 
 SatLooModel (Ptr< SatLooConf > looConf, uint32_t numOfStates, uint32_t initialSet, uint32_t initialState)
 Constructor. More...
 
 ~SatLooModel ()
 Destructor. More...
 
void DoDispose ()
 Do needed dispose actions. More...
 
double GetChannelGain ()
 Function for returning the channel gain. More...
 
double GetChannelGainDb ()
 Function for returning the channel gain in dB. More...
 
void UpdateParameters (uint32_t set, uint32_t state)
 Function for updating the parameter set and state. More...
 
- Public Member Functions inherited from ns3::SatBaseFader
 SatBaseFader ()
 Constructor. More...
 
virtual ~SatBaseFader ()
 Destructor. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 NS-3 function for type id. More...
 
- Static Public Member Functions inherited from ns3::SatBaseFader
static TypeId GetTypeId (void)
 NS-3 type id function. More...
 

Private Member Functions

void CalculateSigma ()
 Function for calculating sigma for different states. More...
 
void ChangeSet (uint32_t newSet, uint32_t newState)
 Function for setting the parameter set and state. More...
 
void ChangeState (uint32_t newState)
 Function for setting the state. More...
 
void ConstructDirectSignalOscillators ()
 Function for constructing direct signal oscillators. More...
 
void ConstructMultipathOscillators ()
 Function for constructing multipath oscillators. More...
 
std::complex< double > GetOscillatorComplexSum (std::vector< Ptr< SatFadingOscillator >> oscillator, double timeInSeconds)
 Function for calculating oscillator complex sum. More...
 
std::complex< double > GetOscillatorCosineWaveSum (std::vector< Ptr< SatFadingOscillator >> oscillator, double timeInSeconds)
 Function for calculating cosine wave oscillator complex sum. More...
 
void Reset ()
 Clear used variables. More...
 

Private Attributes

uint32_t m_currentSet
 Current parameter set. More...
 
uint32_t m_currentState
 Current state. More...
 
std::vector< std::vector< Ptr< SatFadingOscillator > > > m_directSignalOscillators
 Direct signal oscillators. More...
 
Ptr< SatLooConfm_looConf
 Loo's model configuration object. More...
 
std::vector< std::vector< double > > m_looParameters
 Loo's model parameters. More...
 
std::vector< std::vector< Ptr< SatFadingOscillator > > > m_multipathOscillators
 Multipath oscillators. More...
 
Ptr< NormalRandomVariable > m_normalRandomVariable
 Normal distribution random variable. More...
 
uint32_t m_numOfStates
 Number of states. More...
 
std::vector< double > m_sigma
 Multipath power converted to linear units. More...
 
Ptr< UniformRandomVariable > m_uniformVariable
 Uniform distribution random variable. More...
 

Detailed Description

Class for Loo's model fader.

The class implements Loo's model fader for the Markov -based fading model. The model uses multiple oscillators to form the fading (inspired by Jakes model).

Definition at line 40 of file satellite-loo-model.h.

Constructor & Destructor Documentation

◆ SatLooModel() [1/2]

ns3::SatLooModel::SatLooModel ( )

Constructor.

Definition at line 42 of file satellite-loo-model.cc.

◆ SatLooModel() [2/2]

ns3::SatLooModel::SatLooModel ( Ptr< SatLooConf looConf,
uint32_t  numOfStates,
uint32_t  initialSet,
uint32_t  initialState 
)

Constructor.

Parameters
looConfLoo's model configuration
numOfStatesnumber of states
initialSetinitial parameter set
initialStateinitial state

initialize random number generators

initialize parameters for this set and state, construct oscillators

Definition at line 55 of file satellite-loo-model.cc.

References ChangeSet(), m_currentSet, m_currentState, m_normalRandomVariable, and m_uniformVariable.

+ Here is the call graph for this function:

◆ ~SatLooModel()

ns3::SatLooModel::~SatLooModel ( )

Destructor.

Definition at line 78 of file satellite-loo-model.cc.

References Reset().

+ Here is the call graph for this function:

Member Function Documentation

◆ CalculateSigma()

void ns3::SatLooModel::CalculateSigma ( )
private

Function for calculating sigma for different states.

Definition at line 334 of file satellite-loo-model.cc.

References m_looParameters, m_numOfStates, and m_sigma.

Referenced by ChangeSet().

+ Here is the caller graph for this function:

◆ ChangeSet()

void ns3::SatLooModel::ChangeSet ( uint32_t  newSet,
uint32_t  newState 
)
private

Function for setting the parameter set and state.

Parameters
newSetnew set
newStatenew state

Definition at line 284 of file satellite-loo-model.cc.

References CalculateSigma(), ChangeState(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), m_currentSet, m_directSignalOscillators, m_looConf, m_looParameters, m_multipathOscillators, m_numOfStates, and m_sigma.

Referenced by SatLooModel(), and UpdateParameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ChangeState()

void ns3::SatLooModel::ChangeState ( uint32_t  newState)
private

Function for setting the state.

Parameters
newStatenew state

Definition at line 326 of file satellite-loo-model.cc.

References m_currentState.

Referenced by ChangeSet(), and UpdateParameters().

+ Here is the caller graph for this function:

◆ ConstructDirectSignalOscillators()

void ns3::SatLooModel::ConstructDirectSignalOscillators ( )
private

Function for constructing direct signal oscillators.

Initial phase is common for all oscillators:

Theta is common for all oscillators:

  1. Rotation speed 1a. Initiate

    \[ \alpha_n = \frac{2\pi n - \pi + \theta}{4M}, n=1, 2, \ldots, M\]

    , n is oscillatorNumber, M is m_nOscillators

1b. Initiate rotation speed:

  1. Initiate amplitude:

TODO: Direct signal amplitude calculations will need to be verified, especially the target std. deviation with combined oscillators. Currently the std. dev is applied to individual oscillators. Combining these averages these and may result in too small std. dev with the combined value.

  1. Construct oscillator:

Definition at line 132 of file satellite-loo-model.cc.

References m_directSignalOscillators, m_looParameters, m_normalRandomVariable, m_numOfStates, and m_uniformVariable.

Referenced by ChangeSet().

+ Here is the caller graph for this function:

◆ ConstructMultipathOscillators()

void ns3::SatLooModel::ConstructMultipathOscillators ( )
private

Function for constructing multipath oscillators.

Initial phase is common for all oscillators:

Theta is common for all oscillators:

  1. Rotation speed 1a. Initiate

    \[ \alpha_n = \frac{2\pi n - \pi + \theta}{4M}, n=1, 2, \ldots, M\]

    , n is oscillatorNumber, M is m_nOscillators

1b. Initiate rotation speed:

  1. Initiate complex amplitude:
  2. Construct oscillator:

Definition at line 172 of file satellite-loo-model.cc.

References m_looParameters, m_multipathOscillators, m_normalRandomVariable, m_numOfStates, and m_uniformVariable.

Referenced by ChangeSet().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::SatLooModel::DoDispose ( void  )

Do needed dispose actions.

Definition at line 86 of file satellite-loo-model.cc.

References Reset().

+ Here is the call graph for this function:

◆ GetChannelGain()

double ns3::SatLooModel::GetChannelGain ( void  )
virtual

Function for returning the channel gain.

Returns
channel gain

Direct signal

Multipath

Combining

Implements ns3::SatBaseFader.

Definition at line 215 of file satellite-loo-model.cc.

References GetOscillatorComplexSum(), GetOscillatorCosineWaveSum(), m_currentState, m_directSignalOscillators, m_multipathOscillators, and m_sigma.

Referenced by GetChannelGainDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetChannelGainDb()

double ns3::SatLooModel::GetChannelGainDb ( void  )
virtual

Function for returning the channel gain in dB.

Returns
channel gain in dB

Implements ns3::SatBaseFader.

Definition at line 205 of file satellite-loo-model.cc.

References GetChannelGain().

+ Here is the call graph for this function:

◆ GetOscillatorComplexSum()

std::complex< double > ns3::SatLooModel::GetOscillatorComplexSum ( std::vector< Ptr< SatFadingOscillator >>  oscillator,
double  timeInSeconds 
)
private

Function for calculating oscillator complex sum.

Parameters
oscillatoroscillator
timeInSecondscurrent time in seconds
Returns
sum

Definition at line 252 of file satellite-loo-model.cc.

Referenced by GetChannelGain().

+ Here is the caller graph for this function:

◆ GetOscillatorCosineWaveSum()

std::complex< double > ns3::SatLooModel::GetOscillatorCosineWaveSum ( std::vector< Ptr< SatFadingOscillator >>  oscillator,
double  timeInSeconds 
)
private

Function for calculating cosine wave oscillator complex sum.

Parameters
oscillatoroscillator
timeInSecondscurrent time in seconds
Returns
sum

Definition at line 236 of file satellite-loo-model.cc.

Referenced by GetChannelGain().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::SatLooModel::GetTypeId ( void  )
static

NS-3 function for type id.

Returns
type id

Definition at line 35 of file satellite-loo-model.cc.

◆ Reset()

void ns3::SatLooModel::Reset ( void  )
private

Clear used variables.

Definition at line 95 of file satellite-loo-model.cc.

References m_directSignalOscillators, m_looConf, m_looParameters, m_multipathOscillators, m_normalRandomVariable, m_numOfStates, m_sigma, and m_uniformVariable.

Referenced by ~SatLooModel(), and DoDispose().

+ Here is the caller graph for this function:

◆ UpdateParameters()

void ns3::SatLooModel::UpdateParameters ( uint32_t  set,
uint32_t  state 
)
virtual

Function for updating the parameter set and state.

Parameters
setparameter set
statestate

Implements ns3::SatBaseFader.

Definition at line 268 of file satellite-loo-model.cc.

References ChangeSet(), ChangeState(), m_currentSet, and m_currentState.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_currentSet

uint32_t ns3::SatLooModel::m_currentSet
private

Current parameter set.

Definition at line 104 of file satellite-loo-model.h.

Referenced by SatLooModel(), ChangeSet(), and UpdateParameters().

◆ m_currentState

uint32_t ns3::SatLooModel::m_currentState
private

Current state.

Definition at line 109 of file satellite-loo-model.h.

Referenced by SatLooModel(), ChangeState(), GetChannelGain(), and UpdateParameters().

◆ m_directSignalOscillators

std::vector<std::vector<Ptr<SatFadingOscillator> > > ns3::SatLooModel::m_directSignalOscillators
private

Direct signal oscillators.

Definition at line 139 of file satellite-loo-model.h.

Referenced by ChangeSet(), ConstructDirectSignalOscillators(), GetChannelGain(), and Reset().

◆ m_looConf

Ptr<SatLooConf> ns3::SatLooModel::m_looConf
private

Loo's model configuration object.

Definition at line 119 of file satellite-loo-model.h.

Referenced by ChangeSet(), and Reset().

◆ m_looParameters

std::vector<std::vector<double> > ns3::SatLooModel::m_looParameters
private

Loo's model parameters.

Definition at line 124 of file satellite-loo-model.h.

Referenced by CalculateSigma(), ChangeSet(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), and Reset().

◆ m_multipathOscillators

std::vector<std::vector<Ptr<SatFadingOscillator> > > ns3::SatLooModel::m_multipathOscillators
private

Multipath oscillators.

Definition at line 144 of file satellite-loo-model.h.

Referenced by ChangeSet(), ConstructMultipathOscillators(), GetChannelGain(), and Reset().

◆ m_normalRandomVariable

Ptr<NormalRandomVariable> ns3::SatLooModel::m_normalRandomVariable
private

Normal distribution random variable.

Definition at line 129 of file satellite-loo-model.h.

Referenced by SatLooModel(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), and Reset().

◆ m_numOfStates

uint32_t ns3::SatLooModel::m_numOfStates
private

◆ m_sigma

std::vector<double> ns3::SatLooModel::m_sigma
private

Multipath power converted to linear units.

Definition at line 114 of file satellite-loo-model.h.

Referenced by CalculateSigma(), ChangeSet(), GetChannelGain(), and Reset().

◆ m_uniformVariable

Ptr<UniformRandomVariable> ns3::SatLooModel::m_uniformVariable
private

Uniform distribution random variable.

Definition at line 134 of file satellite-loo-model.h.

Referenced by SatLooModel(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), and Reset().


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