IT++ Logo Newcom Logo

itpp::Rice_Fading_Generator Class Reference
[Communication Channel Models]

Rice type Fading generator class. More...

#include <itpp/comm/channel.h>

Inheritance diagram for itpp::Rice_Fading_Generator:

itpp::Fading_Generator List of all members.

Public Member Functions

 Rice_Fading_Generator (const double norm_doppler=0.0, const DOPPLER_SPECTRUM spectrum=Jakes, const int no_freq=16, const RICE_METHOD method=MEDS)
 Set normalized dopper, doppler spectrum, number of doppler frequencies and calculation method.
virtual ~Rice_Fading_Generator ()
 Destructor.
void set_no_frequencies (const int no_freq)
 Set number of doppler frequencies.
void set_method (const RICE_METHOD method)
 Set calculation method for calculation of doppler frequencies and amplitudes.
int get_no_frequencies ()
 Get number of doppler frequencies.
RICE_METHOD get_method ()
 Get calculation method for calculation of doppler frequencies and amplitudes.
virtual void init ()
 Initialize the generator (is not needed) and set time offset to 0.
void set_time_offset (const int offset)
 set time offset in samples
double get_time_offset ()
 get time offset in samples
virtual void generate (const int no_samples, cvec &output)
 Generate no_samples values from the fading process.
virtual void generate (const int no_samples, const int upsampling_factor, cvec &output)
 Generate no_samples values from the fading process upsampled by upsampling_factor.
void set_norm_doppler (const double norm_doppler)
 Set normalized doppler rate.
void set_doppler_spectrum (const DOPPLER_SPECTRUM spectrum)
 Set doppler spectrum.
void set_LOS (const double relative_power, const double relative_doppler)
 Set LOS component. Used e.g. for Rice doppler spectrum. Rice factor and relative doppler (related to maximum doppler).
double get_norm_doppler ()
 Return normalized doppler rate.
DOPPLER_SPECTRUM get_doppler_spectrum ()
 Return doppler spectrum.
double get_LOS_power ()
 Get relative power of LOS component (Rice factor).
double get_LOS_doppler ()
 Get relative doppler (compared to maximum doppler) for the LOS component.
cvec generate (const int no_samples)
 Generate no_samples values from the fading process.
cvec generate (const int no_samples, const int upsampling_factor)
 Generate no_samples values from the fading process upsampled by upsampling_factor.
void shift_time_offset (const int no_samples)
 Shift generator time offset by a number of samples.

Protected Member Functions

void init_MEDS ()
 Init function for MEDS method.
void generate_zero_doppler (const int no_samples, cvec &output)
void generate_zero_doppler (const int no_samples, const int upsampling_factor, cvec &output)

Protected Attributes

int Ni
 Generate no_samples values from the fading process.
RICE_METHOD rice_method
vec f1
vec f2
vec c1
vec c2
vec th1
vec th2
DOPPLER_SPECTRUM dopp_spectrum
double n_dopp
double los_dopp
double los_power
bool init_flag
double time_offset

Detailed Description

Rice type Fading generator class.

Author:
Tony Ottosson
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 \leftarrow \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 is the normalized doppler and the doppler spectrum. Possible values of doppler spectra are:

Furthermore also the number of doppler frequencies, $N_i$ and the method used to calculate the parameters $c_{i,n}$, $f_{i,n}$, and $\theta_{i,n}$ are parameters. For now the only method defined for calculating the parameters is the Method of Exact Doppler Spread (MEDS). See [P"atzold] for more details.

References:

[P"atzold] Matthias P"atzold, Mobile fading channels, Wiley, 2002.

Definition at line 301 of file channel.h.


Constructor & Destructor Documentation

itpp::Rice_Fading_Generator::Rice_Fading_Generator ( const double  norm_doppler = 0.0,
const DOPPLER_SPECTRUM  spectrum = Jakes,
const int  no_freq = 16,
const RICE_METHOD  method = MEDS 
)

Set normalized dopper, doppler spectrum, number of doppler frequencies and calculation method.

Definition at line 144 of file channel.cpp.

References set_method(), and set_no_frequencies().

virtual itpp::Rice_Fading_Generator::~Rice_Fading_Generator (  )  [inline, virtual]

Destructor.

Definition at line 307 of file channel.h.


Member Function Documentation

void itpp::Rice_Fading_Generator::set_no_frequencies ( const int  no_freq  ) 

Set number of doppler frequencies.

Definition at line 151 of file channel.cpp.

References itpp::Fading_Generator::init_flag, it_assert, and Ni.

Referenced by Rice_Fading_Generator().

void itpp::Rice_Fading_Generator::set_method ( const RICE_METHOD  method  ) 

Set calculation method for calculation of doppler frequencies and amplitudes.

Definition at line 158 of file channel.cpp.

References itpp::Fading_Generator::init_flag, and rice_method.

Referenced by Rice_Fading_Generator().

int itpp::Rice_Fading_Generator::get_no_frequencies (  ) 

Get number of doppler frequencies.

Definition at line 165 of file channel.cpp.

References Ni.

RICE_METHOD itpp::Rice_Fading_Generator::get_method (  ) 

Get calculation method for calculation of doppler frequencies and amplitudes.

Definition at line 170 of file channel.cpp.

References rice_method.

void itpp::Rice_Fading_Generator::init (  )  [virtual]

Initialize the generator (is not needed) and set time offset to 0.

Implements itpp::Fading_Generator.

Definition at line 175 of file channel.cpp.

References itpp::Fading_Generator::init_flag, init_MEDS(), it_error, itpp::MEDS, rice_method, and itpp::Fading_Generator::time_offset.

Referenced by generate().

void itpp::Rice_Fading_Generator::set_time_offset ( const int  offset  ) 

set time offset in samples

Definition at line 190 of file channel.cpp.

References it_assert, and itpp::Fading_Generator::time_offset.

double itpp::Rice_Fading_Generator::get_time_offset (  ) 

get time offset in samples

Definition at line 196 of file channel.cpp.

References itpp::Fading_Generator::time_offset.

void itpp::Rice_Fading_Generator::generate ( const int  no_samples,
cvec &  output 
) [virtual]

Generate no_samples values from the fading process.

Implements itpp::Fading_Generator.

Definition at line 201 of file channel.cpp.

References c1, c2, itpp::cos(), itpp::elem_mult(), f1, f2, itpp::Fading_Generator::generate_zero_doppler(), init(), itpp::Fading_Generator::init_flag, itpp::Fading_Generator::los_dopp, itpp::Fading_Generator::los_power, itpp::Fading_Generator::n_dopp, itpp::pi, itpp::sin(), itpp::sqrt(), itpp::sum(), th1, th2, and itpp::Fading_Generator::time_offset.

void itpp::Rice_Fading_Generator::generate ( const int  no_samples,
const int  upsampling_factor,
cvec &  output 
) [virtual]

Generate no_samples values from the fading process upsampled by upsampling_factor.

Implements itpp::Fading_Generator.

Definition at line 227 of file channel.cpp.

References c1, c2, itpp::cos(), itpp::elem_mult(), f1, f2, itpp::Fading_Generator::generate_zero_doppler(), init(), itpp::Fading_Generator::init_flag, itpp::Fading_Generator::los_dopp, itpp::Fading_Generator::los_power, itpp::Fading_Generator::n_dopp, itpp::pi, itpp::sin(), itpp::sqrt(), itpp::sum(), th1, th2, and itpp::Fading_Generator::time_offset.

void itpp::Rice_Fading_Generator::init_MEDS (  )  [protected]

Init function for MEDS method.

Definition at line 254 of file channel.cpp.

References c1, c2, itpp::Fading_Generator::dopp_spectrum, f1, f2, it_error, itpp::Jakes, itpp::linspace(), Ni, itpp::ones(), itpp::pi, itpp::randu(), itpp::Rice, itpp::sin(), itpp::sqrt(), th1, and th2.

Referenced by init().

void itpp::Fading_Generator::set_norm_doppler ( const double  norm_doppler  )  [inherited]

Set normalized doppler rate.

Definition at line 72 of file channel.cpp.

References itpp::Fading_Generator::init_flag, it_assert, and itpp::Fading_Generator::n_dopp.

Referenced by itpp::Fading_Generator::Fading_Generator().

void itpp::Fading_Generator::set_doppler_spectrum ( const DOPPLER_SPECTRUM  spectrum  )  [inherited]

Set doppler spectrum.

Definition at line 79 of file channel.cpp.

References itpp::Fading_Generator::dopp_spectrum, itpp::Fading_Generator::init_flag, itpp::Fading_Generator::los_dopp, itpp::Fading_Generator::los_power, and itpp::Rice.

Referenced by itpp::Fading_Generator::Fading_Generator().

void itpp::Fading_Generator::set_LOS ( const double  relative_power,
const double  relative_doppler 
) [inherited]

Set LOS component. Used e.g. for Rice doppler spectrum. Rice factor and relative doppler (related to maximum doppler).

Definition at line 89 of file channel.cpp.

References itpp::Fading_Generator::dopp_spectrum, itpp::Fading_Generator::init_flag, it_assert, itpp::Fading_Generator::los_dopp, itpp::Fading_Generator::los_power, and itpp::Rice.

double itpp::Fading_Generator::get_norm_doppler (  )  [inline, inherited]

Return normalized doppler rate.

Definition at line 234 of file channel.h.

References itpp::Fading_Generator::n_dopp.

DOPPLER_SPECTRUM itpp::Fading_Generator::get_doppler_spectrum (  )  [inline, inherited]

Return doppler spectrum.

Definition at line 236 of file channel.h.

References itpp::Fading_Generator::dopp_spectrum.

double itpp::Fading_Generator::get_LOS_power (  )  [inline, inherited]

Get relative power of LOS component (Rice factor).

Definition at line 238 of file channel.h.

References itpp::Fading_Generator::los_power.

double itpp::Fading_Generator::get_LOS_doppler (  )  [inline, inherited]

Get relative doppler (compared to maximum doppler) for the LOS component.

Definition at line 240 of file channel.h.

References itpp::Fading_Generator::los_dopp.

cvec itpp::Fading_Generator::generate ( const int  no_samples  )  [inherited]

Generate no_samples values from the fading process.

Definition at line 99 of file channel.cpp.

References itpp::Fading_Generator::generate().

cvec itpp::Fading_Generator::generate ( const int  no_samples,
const int  upsampling_factor 
) [inherited]

Generate no_samples values from the fading process upsampled by upsampling_factor.

Definition at line 106 of file channel.cpp.

References itpp::Fading_Generator::generate().

void itpp::Fading_Generator::shift_time_offset ( const int  no_samples  )  [inherited]

Shift generator time offset by a number of samples.

Definition at line 113 of file channel.cpp.

References itpp::Fading_Generator::time_offset.


Member Data Documentation

int itpp::Rice_Fading_Generator::Ni [protected]

Generate no_samples values from the fading process.

Definition at line 335 of file channel.h.

Referenced by get_no_frequencies(), init_MEDS(), and set_no_frequencies().


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

Generated on Sat Aug 25 23:40:35 2007 for IT++ by Doxygen 1.5.2