itpp::Rice_Fading_Generator Class Reference

Rice type fading generator class. More...

`#include <itpp/comm/channel.h>`

Inheritance diagram for itpp::Rice_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 | generate (int no_samples, cvec &output)=0
| Generate no_samples values from the fading process.
virtual void | generate (int no_samples, cvec &output)=0
| Generate no_samples values from the fading process.
cvec | generate (int no_samples)
| 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.
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:

Here , , and 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 . When generating a fading pattern we need a complex-valued generator

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

- Jakes, J, Classic, C: The classical Jakes spectrum shape. This method can be also used for modelling LOS paths, by setting the LOS relative power (Rice factor) and LOS Doppler parameters.
- GaussI, GI, Gauss1, G1
- GaussII, GII, Gauss2, G2

Furthermore also the number of sine waves, and method used to calculate the parameters , , and 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:

- [Pat02] Matthias Patzold, Mobile fading channels, Wiley, 2002.

Definition at line 467 of file channel.h.

## Constructor & Destructor Documentation

## Rice_Fading_Generator()

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

Default constructor.

Definition at line 248 of file channel.cpp.

References set_doppler_spectrum(), set_no_frequencies(), set_rice_method(), and itpp::spectrum().

## ~Rice_Fading_Generator()

virtual itpp::Rice_Fading_Generator::~Rice_Fading_Generator | ( |  | ) |

inline virtual

Destructor.

Definition at line 474 of file channel.h.

## Member Function Documentation

## set_doppler_spectrum()

void itpp::Rice_Fading_Generator::set_doppler_spectrum | ( | DOPPLER_SPECTRUM | spectrum | ) |

virtual

Set Doppler spectrum.

Reimplemented from itpp::Fading_Generator.

Definition at line 258 of file channel.cpp.

References dopp_spectrum, itpp::Fading_Generator::init_flag, and itpp::spectrum().

Referenced by Rice_Fading_Generator().

## set_no_frequencies()

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

virtual

Set number of Doppler frequencies.

Reimplemented from itpp::Fading_Generator.

Definition at line 264 of file channel.cpp.

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

Referenced by Rice_Fading_Generator().

## set_rice_method()

void itpp::Rice_Fading_Generator::set_rice_method | ( | RICE_METHOD | method | ) |

virtual

Set calculation method of Doppler frequencies and amplitudes.

Reimplemented from itpp::Fading_Generator.

Definition at line 272 of file channel.cpp.

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

Referenced by Rice_Fading_Generator().

## get_doppler_spectrum()

virtual DOPPLER_SPECTRUM itpp::Rice_Fading_Generator::get_doppler_spectrum | ( |  | ) | const

inline virtual

Return Doppler spectrum.

Reimplemented from itpp::Fading_Generator.

Definition at line 484 of file channel.h.

## get_no_frequencies()

virtual int itpp::Rice_Fading_Generator::get_no_frequencies | ( |  | ) | const

inline virtual

Get number of Doppler frequencies.

Reimplemented from itpp::Fading_Generator.

Definition at line 486 of file channel.h.

## get_rice_method()

virtual RICE_METHOD itpp::Rice_Fading_Generator::get_rice_method | ( |  | ) | const

inline virtual

Get calculation method of Doppler frequencies and amplitudes.

Reimplemented from itpp::Fading_Generator.

Definition at line 488 of file channel.h.

## init()

void itpp::Rice_Fading_Generator::init | ( |  | ) |

virtual

Initialize the generator.

Implements itpp::Correlated_Fading_Generator.

Definition at line 279 of file channel.cpp.

Referenced by generate().

## generate() [1/4]

void itpp::Rice_Fading_Generator::generate | ( | int | no_samples,
|  | cvec & | output
| ) |  |

virtual

Generate no_samples values from the fading process.

Implements itpp::Correlated_Fading_Generator.

Definition at line 292 of file channel.cpp.

References itpp::Correlated_Fading_Generator::add_LOS(), c1, c2, itpp::cos(), dopp_spectrum, itpp::elem_mult(), f01, f02, f1, f2, init(), itpp::Fading_Generator::init_flag, itpp::Fading_Generator::los_power, itpp::m_2pi, itpp::Correlated_Fading_Generator::n_dopp, itpp::sum(), th1, th2, and itpp::Correlated_Fading_Generator::time_offset.

## init_MEDS()

void itpp::Rice_Fading_Generator::init_MEDS | ( |  | ) |

protected

Init function for MEDS method.

Definition at line 336 of file channel.cpp.

References c1, c2, dopp_spectrum, itpp::erfinv(), f01, f02, f1, f2, it_error, itpp::linspace(), Ni, itpp::ones(), itpp::pi, itpp::randu(), itpp::sin(), th1, and th2.

Referenced by itpp::Independent_Fading_Generator::generate().

## generate() [2/4]

virtual void itpp::Correlated_Fading_Generator::generate | ( | int | no_samples,
|  | cvec & | output
| ) |  |

virtual

Generate no_samples values from the fading process.

Implements itpp::Correlated_Fading_Generator.

## generate() [3/4]

virtual void itpp::Fading_Generator::generate | ( | int | no_samples,
|  | cvec & | output
| ) |  |

virtual

Generate no_samples values from the fading process.

Implements itpp::Correlated_Fading_Generator.

## generate() [4/4]

cvec itpp::Fading_Generator::generate | ( | int | no_samples | ) |

Generate no_samples values from the fading process.

Definition at line 418 of file channel.cpp.

## set_norm_doppler()

void itpp::Correlated_Fading_Generator::set_norm_doppler | ( | double | norm_doppler | ) |

virtual inherited

Set normalized Doppler.

Reimplemented from itpp::Fading_Generator.

Definition at line 210 of file channel.cpp.

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

Referenced by itpp::Correlated_Fading_Generator::Correlated_Fading_Generator().

## set_LOS_doppler()

void itpp::Correlated_Fading_Generator::set_LOS_doppler | ( | double | relative_doppler | ) |

virtual inherited

Set relative Doppler (compared to the maximum Doppler) for the LOS component.

Reimplemented from itpp::Fading_Generator.

Definition at line 218 of file channel.cpp.

References it_assert, and itpp::Correlated_Fading_Generator::los_dopp.

## set_time_offset()

void itpp::Correlated_Fading_Generator::set_time_offset | ( | int | offset | ) |

virtual inherited

Set time offset in samples.

Reimplemented from itpp::Fading_Generator.

Definition at line 225 of file channel.cpp.

References itpp::Correlated_Fading_Generator::time_offset.

## get_norm_doppler()

virtual double itpp::Correlated_Fading_Generator::get_norm_doppler | ( |  | ) | const

inline virtual inherited

Return normalized Doppler.

Reimplemented from itpp::Fading_Generator.

Definition at line 406 of file channel.h.

## get_LOS_doppler()

virtual double itpp::Correlated_Fading_Generator::get_LOS_doppler | ( |  | ) | const

inline virtual inherited

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

Reimplemented from itpp::Fading_Generator.

Definition at line 408 of file channel.h.

## get_time_offset()

virtual double itpp::Correlated_Fading_Generator::get_time_offset | ( |  | ) | const

inline virtual inherited

Get time offset in samples.

Reimplemented from itpp::Fading_Generator.

Definition at line 410 of file channel.h.

## shift_time_offset()

void itpp::Correlated_Fading_Generator::shift_time_offset | ( | int | no_samples | ) |

virtual inherited

Shift generator time offset by a number of samples.

Reimplemented from itpp::Fading_Generator.

Definition at line 230 of file channel.cpp.

References itpp::Correlated_Fading_Generator::time_offset.

## add_LOS()

void itpp::Correlated_Fading_Generator::add_LOS | ( | int | idx,
|  | std::complex< double > & | sample
| ) |  |

protected inherited

add LOS component to the sample with index idx

Definition at line 235 of file channel.cpp.

References itpp::Fading_Generator::los_diffuse, itpp::Fading_Generator::los_direct, itpp::Correlated_Fading_Generator::los_dopp, itpp::m_2pi, itpp::Correlated_Fading_Generator::n_dopp, and itpp::Correlated_Fading_Generator::time_offset.

Referenced by generate(), itpp::FIR_Fading_Generator::generate(), and itpp::IFFT_Fading_Generator::generate().

## set_LOS_power()

void itpp::Fading_Generator::set_LOS_power | ( | double | relative_power | ) |

inherited

Set relative LOS power.

Definition at line 57 of file channel.cpp.

References it_assert, itpp::Fading_Generator::los_diffuse, itpp::Fading_Generator::los_direct, and itpp::Fading_Generator::los_power.

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

## set_filter_length()

void itpp::Fading_Generator::set_filter_length | ( | int | filter_length | ) |

virtual inherited

Set FIR filter length (for FIR fading generator)

Reimplemented in itpp::FIR_Fading_Generator.

Definition at line 81 of file channel.cpp.

References it_warning.

## get_LOS_power()

double itpp::Fading_Generator::get_LOS_power | ( |  | ) | const

inline inherited

Get relative power of LOS component (Rice factor)

Definition at line 254 of file channel.h.

## get_filter_length()

int itpp::Fading_Generator::get_filter_length | ( |  | ) | const

virtual inherited

Set FIR filter length (for FIR fading generator)

Reimplemented in itpp::FIR_Fading_Generator.

Definition at line 113 of file channel.cpp.

References it_warning.

## Member Data Documentation

## dopp_spectrum

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().

## Ni

int itpp::Rice_Fading_Generator::Ni

protected

Number of sine waves in a Gaussian process.

Definition at line 501 of file channel.h.

Referenced by init_MEDS(), and set_no_frequencies().

## rice_method

RICE_METHOD itpp::Rice_Fading_Generator::rice_method

protected

Rice process generation method.

Definition at line 503 of file channel.h.

Referenced by itpp::Independent_Fading_Generator::generate(), and set_rice_method().

## f1

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().

## f2

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().

## c1

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().

## c2

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().

## th1

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().

## th2

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().

## f01

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().

## f02

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().

## n_dopp

double itpp::Correlated_Fading_Generator::n_dopp

protected inherited

Normalized maximum Doppler frequency.

Definition at line 424 of file channel.h.

Referenced by itpp::Correlated_Fading_Generator::add_LOS(), generate(), itpp::IFFT_Fading_Generator::generate_Jakes(), itpp::FIR_Fading_Generator::init(), and itpp::Correlated_Fading_Generator::set_norm_doppler().

## los_dopp

double itpp::Correlated_Fading_Generator::los_dopp

protected inherited

Relative Doppler on LOS component (0.7 by default)

Definition at line 425 of file channel.h.

Referenced by itpp::Correlated_Fading_Generator::add_LOS(), and itpp::Correlated_Fading_Generator::set_LOS_doppler().

## time_offset

double itpp::Correlated_Fading_Generator::time_offset

protected inherited

Time offset in samples (time state in the generator)

Definition at line 426 of file channel.h.

Referenced by itpp::Correlated_Fading_Generator::add_LOS(), generate(), itpp::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Correlated_Fading_Generator::set_time_offset(), and itpp::Correlated_Fading_Generator::shift_time_offset().

## init_flag

bool itpp::Fading_Generator::init_flag

protected inherited

signals if generator is initialized or not

Definition at line 282 of file channel.h.

Referenced by itpp::Independent_Fading_Generator::generate(), itpp::Static_Fading_Generator::generate(), generate(), itpp::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Static_Fading_Generator::init(), set_doppler_spectrum(), itpp::FIR_Fading_Generator::set_filter_length(), set_no_frequencies(), itpp::Correlated_Fading_Generator::set_norm_doppler(), and set_rice_method().

## los_power

double itpp::Fading_Generator::los_power

protected inherited

Relative power of LOS component compared to diffuse component (K factor)

Definition at line 283 of file channel.h.

Referenced by itpp::Independent_Fading_Generator::generate(), generate(), itpp::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Static_Fading_Generator::init(), and itpp::Fading_Generator::set_LOS_power().

## los_diffuse

double itpp::Fading_Generator::los_diffuse

protected inherited

Diffuse component: sqrt(1 / (1 + los_power))

Definition at line 284 of file channel.h.

Referenced by itpp::Correlated_Fading_Generator::add_LOS(), itpp::Independent_Fading_Generator::generate(), itpp::Static_Fading_Generator::init(), and itpp::Fading_Generator::set_LOS_power().

## los_direct

double itpp::Fading_Generator::los_direct

protected inherited

Direct component: sqrt(los_power / (1 + los_power))

Definition at line 285 of file channel.h.

Referenced by itpp::Correlated_Fading_Generator::add_LOS(), itpp::Independent_Fading_Generator::generate(), itpp::Static_Fading_Generator::init(), and itpp::Fading_Generator::set_LOS_power().

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

- itpp/comm/channel.h
- itpp/comm/channel.cpp

Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8