Class for Loo's model fader. More...
#include "satellite-loo-model.h"
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< SatLooConf > | m_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... | |
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 44 of file satellite-loo-model.h.
ns3::SatLooModel::SatLooModel | ( | ) |
Constructor.
Definition at line 46 of file satellite-loo-model.cc.
ns3::SatLooModel::SatLooModel | ( | Ptr< SatLooConf > | looConf, |
uint32_t | numOfStates, | ||
uint32_t | initialSet, | ||
uint32_t | initialState | ||
) |
Constructor.
looConf | Loo's model configuration |
numOfStates | number of states |
initialSet | initial parameter set |
initialState | initial state |
initialize random number generators
initialize parameters for this set and state, construct oscillators
Definition at line 59 of file satellite-loo-model.cc.
References ChangeSet(), m_currentSet, m_currentState, m_normalRandomVariable, and m_uniformVariable.
ns3::SatLooModel::~SatLooModel | ( | ) |
Destructor.
Definition at line 82 of file satellite-loo-model.cc.
References Reset().
|
private |
Function for calculating sigma for different states.
Definition at line 338 of file satellite-loo-model.cc.
References m_looParameters, m_numOfStates, and m_sigma.
Referenced by ChangeSet().
|
private |
Function for setting the parameter set and state.
newSet | new set |
newState | new state |
Definition at line 288 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().
|
private |
Function for setting the state.
newState | new state |
Definition at line 330 of file satellite-loo-model.cc.
References m_currentState.
Referenced by ChangeSet(), and UpdateParameters().
|
private |
Function for constructing direct signal oscillators.
Initial phase is common for all oscillators:
Theta is common for all oscillators:
, n is oscillatorNumber, M is m_nOscillators
1b. Initiate rotation speed:
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.
Definition at line 136 of file satellite-loo-model.cc.
References m_directSignalOscillators, m_looParameters, m_normalRandomVariable, m_numOfStates, and m_uniformVariable.
Referenced by ChangeSet().
|
private |
Function for constructing multipath oscillators.
Initial phase is common for all oscillators:
Theta is common for all oscillators:
, n is oscillatorNumber, M is m_nOscillators
1b. Initiate rotation speed:
Definition at line 176 of file satellite-loo-model.cc.
References m_looParameters, m_multipathOscillators, m_normalRandomVariable, m_numOfStates, and m_uniformVariable.
Referenced by ChangeSet().
void ns3::SatLooModel::DoDispose | ( | void | ) |
Do needed dispose actions.
Definition at line 90 of file satellite-loo-model.cc.
References Reset().
|
virtual |
Function for returning the channel gain.
Direct signal
Multipath
Combining
Implements ns3::SatBaseFader.
Definition at line 219 of file satellite-loo-model.cc.
References GetOscillatorComplexSum(), GetOscillatorCosineWaveSum(), m_currentState, m_directSignalOscillators, m_multipathOscillators, and m_sigma.
Referenced by GetChannelGainDb().
|
virtual |
Function for returning the channel gain in dB.
Implements ns3::SatBaseFader.
Definition at line 209 of file satellite-loo-model.cc.
References GetChannelGain().
|
private |
Function for calculating oscillator complex sum.
oscillator | oscillator |
timeInSeconds | current time in seconds |
Definition at line 256 of file satellite-loo-model.cc.
Referenced by GetChannelGain().
|
private |
Function for calculating cosine wave oscillator complex sum.
oscillator | oscillator |
timeInSeconds | current time in seconds |
Definition at line 240 of file satellite-loo-model.cc.
Referenced by GetChannelGain().
|
static |
|
private |
Clear used variables.
Definition at line 99 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().
|
virtual |
Function for updating the parameter set and state.
set | parameter set |
state | state |
Implements ns3::SatBaseFader.
Definition at line 272 of file satellite-loo-model.cc.
References ChangeSet(), ChangeState(), m_currentSet, and m_currentState.
|
private |
Current parameter set.
Definition at line 108 of file satellite-loo-model.h.
Referenced by SatLooModel(), ChangeSet(), and UpdateParameters().
|
private |
Current state.
Definition at line 113 of file satellite-loo-model.h.
Referenced by SatLooModel(), ChangeState(), GetChannelGain(), and UpdateParameters().
|
private |
Direct signal oscillators.
Definition at line 143 of file satellite-loo-model.h.
Referenced by ChangeSet(), ConstructDirectSignalOscillators(), GetChannelGain(), and Reset().
|
private |
Loo's model configuration object.
Definition at line 123 of file satellite-loo-model.h.
Referenced by ChangeSet(), and Reset().
|
private |
Loo's model parameters.
Definition at line 128 of file satellite-loo-model.h.
Referenced by CalculateSigma(), ChangeSet(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), and Reset().
|
private |
Multipath oscillators.
Definition at line 148 of file satellite-loo-model.h.
Referenced by ChangeSet(), ConstructMultipathOscillators(), GetChannelGain(), and Reset().
|
private |
Normal distribution random variable.
Definition at line 133 of file satellite-loo-model.h.
Referenced by SatLooModel(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), and Reset().
|
private |
Number of states.
Definition at line 103 of file satellite-loo-model.h.
Referenced by CalculateSigma(), ChangeSet(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), and Reset().
|
private |
Multipath power converted to linear units.
Definition at line 118 of file satellite-loo-model.h.
Referenced by CalculateSigma(), ChangeSet(), GetChannelGain(), and Reset().
|
private |
Uniform distribution random variable.
Definition at line 138 of file satellite-loo-model.h.
Referenced by SatLooModel(), ConstructDirectSignalOscillators(), ConstructMultipathOscillators(), and Reset().