IT++ Logo
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
itpp::Rice_Fading_Generator Class Reference

Rice type fading generator class. More...

#include <itpp/comm/channel.h>

Inheritance diagram for itpp::Rice_Fading_Generator:
itpp::Correlated_Fading_Generator itpp::Fading_Generator

Public Member Functions

 Rice_Fading_Generator (double norm_doppler, DOPPLER_SPECTRUM spectrum=Jakes, int no_freq=16, RICE_METHOD method=MEDS)
 Default constructor.
 
virtual ~Rice_Fading_Generator ()
 Destructor.
 
virtual void set_doppler_spectrum (DOPPLER_SPECTRUM spectrum)
 Set Doppler spectrum.
 
virtual void set_no_frequencies (int no_freq)
 Set number of Doppler frequencies.
 
virtual void set_rice_method (RICE_METHOD method)
 Set calculation method of Doppler frequencies and amplitudes.
 
virtual DOPPLER_SPECTRUM get_doppler_spectrum () const
 Return Doppler spectrum.
 
virtual int get_no_frequencies () const
 Get number of Doppler frequencies.
 
virtual RICE_METHOD get_rice_method () const
 Get calculation method of Doppler frequencies and amplitudes.
 
virtual void init ()
 Initialize the generator.
 
virtual void generate (int no_samples, cvec &output)
 Generate no_samples values from the fading process.
 
virtual void set_norm_doppler (double norm_doppler)
 Set normalized Doppler.
 
virtual void set_LOS_doppler (double relative_doppler)
 Set relative Doppler (compared to the maximum Doppler) for the LOS component.
 
virtual void set_time_offset (int offset)
 Set time offset in samples.
 
virtual double get_norm_doppler () const
 Return normalized Doppler.
 
virtual double get_LOS_doppler () const
 Get relative Doppler (compared to the maximum doppler) for the LOS component.
 
virtual double get_time_offset () const
 Get time offset in samples.
 
virtual void shift_time_offset (int no_samples)
 Shift generator time offset by a number of samples.
 
cvec generate (int no_samples)
 Generate no_samples values from the fading process.
 
void set_LOS_power (double relative_power)
 Set relative LOS power.
 
virtual void set_filter_length (int filter_length)
 Set FIR filter length (for FIR fading generator)
 
double get_LOS_power () const
 Get relative power of LOS component (Rice factor)
 
virtual int get_filter_length () const
 Set FIR filter length (for FIR fading generator)
 

Protected Member Functions

void init_MEDS ()
 Init function for MEDS method.
 
void add_LOS (int idx, std::complex< double > &sample)
 add LOS component to the sample with index idx
 

Protected Attributes

DOPPLER_SPECTRUM dopp_spectrum
 
int Ni
 Number of sine waves in a Gaussian process.
 
RICE_METHOD rice_method
 Rice process generation method.
 
double n_dopp
 Normalized maximum Doppler frequency.
 
double los_dopp
 Relative Doppler on LOS component (0.7 by default)
 
double time_offset
 Time offset in samples (time state in the generator)
 
bool init_flag
 signals if generator is initialized or not
 
double los_power
 Relative power of LOS component compared to diffuse component (K factor)
 
double los_diffuse
 Diffuse component: sqrt(1 / (1 + los_power))
 
double los_direct
 Direct component: sqrt(los_power / (1 + los_power))
 
vec f1
 
vec f2
 
vec c1
 
vec c2
 
vec th1
 
vec th2
 
double f01
 
double f02
 

Detailed Description

Rice type fading generator class.

Author
Tony Ottosson, Adam Piatyszek and Zbigniew Dlugaszewski

A Rice generator is a generator of the form:

\[ \tilde \mu_i(t) = \sum_{n=1}^{N_i} c_{i,n} \cos(2\pi f_{i,n} t + \theta_{i,n}) \]

Here $ c_{i,n} $, $ f_{i,n} $, and $ \theta_{i,n} $ are the Doppler coefficients, discrete Doppler frequencies, and Doppler phases, respectively. Rice showed that a generator of this form can perfectly model a Gaussian process when $ N_i \rightarrow \infty $. When generating a fading pattern we need a complex-valued generator

\[ \tilde \mu(t) = \tilde \mu_1(t) + j \tilde \mu_2(t) \]

Parameters that define the generator are the normalized Doppler and the doppler spectrum. Possible values of the Doppler spectrum are:

Furthermore also the number of sine waves, $ N_i $ and method used to calculate the parameters $ c_{i,n} $, $ f_{i,n} $, and $ \theta_{i,n} $ can be specified. For now the only method defined for calculating the parameters is the Method of Exact Doppler Spread (MEDS). See [Pat02] for more details.

References:

Definition at line 467 of file channel.h.

Member Data Documentation

DOPPLER_SPECTRUM itpp::Rice_Fading_Generator::dopp_spectrum
protected

Doppler spectrum type (Jakes by default)

Definition at line 499 of file channel.h.

Referenced by generate(), init_MEDS(), and set_doppler_spectrum().

vec itpp::Rice_Fading_Generator::f1
protected

Doppler frequencies, amplitudes and phases

Definition at line 506 of file channel.h.

Referenced by generate(), and init_MEDS().

vec itpp::Rice_Fading_Generator::f2
protected

Doppler frequencies, amplitudes and phases

Definition at line 506 of file channel.h.

Referenced by generate(), and init_MEDS().

vec itpp::Rice_Fading_Generator::c1
protected

Doppler frequencies, amplitudes and phases

Definition at line 506 of file channel.h.

Referenced by generate(), and init_MEDS().

vec itpp::Rice_Fading_Generator::c2
protected

Doppler frequencies, amplitudes and phases

Definition at line 506 of file channel.h.

Referenced by generate(), and init_MEDS().

vec itpp::Rice_Fading_Generator::th1
protected

Doppler frequencies, amplitudes and phases

Definition at line 506 of file channel.h.

Referenced by generate(), and init_MEDS().

vec itpp::Rice_Fading_Generator::th2
protected

Doppler frequencies, amplitudes and phases

Definition at line 506 of file channel.h.

Referenced by generate(), and init_MEDS().

double itpp::Rice_Fading_Generator::f01
protected

Frequency shift values of the Doppler spectrum in GaussI and GaussII

Definition at line 510 of file channel.h.

Referenced by generate(), and init_MEDS().

double itpp::Rice_Fading_Generator::f02
protected

Frequency shift values of the Doppler spectrum in GaussI and GaussII

Definition at line 510 of file channel.h.

Referenced by generate(), and init_MEDS().


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

Generated on Sat Jul 6 2013 10:54:31 for IT++ by Doxygen 1.8.2