itpp::IFFT_Fading_Generator Class Reference

IFFT type Fading generator class. More...

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

Inheritance diagram for itpp::IFFT_Fading_Generator:

## Public Member Functions

| IFFT_Fading_Generator (double norm_doppler)
| Default constructor.
virtual | ~IFFT_Fading_Generator ()
| Destructor.
virtual void | init ()
| Initialize the generator.
virtual void | generate (int no_samples, cvec &output)
| 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).
virtual void | set_doppler_spectrum (DOPPLER_SPECTRUM spectrum)
| Set Doppler spectrum (for Rice fading generator).
virtual void | set_no_frequencies (int no_freq)
| Set number of sine frequencies (for Rice fading generator).
virtual void | set_rice_method (RICE_METHOD method)
| Set calculation method of Doppler frequencies and amplitudes (for Rice 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).
virtual DOPPLER_SPECTRUM | get_doppler_spectrum () const
| Return Doppler spectrum (for Rice fading generator).
virtual int | get_no_frequencies () const
| Get number of sine frequencies (for Rice fading generator).
virtual RICE_METHOD | get_rice_method () const
| Get calculation method of Doppler frequencies and amplitudes (for Rice fading generator).

## Protected Member Functions

void | generate_Jakes (int no_samples, cvec &output)
| Generator for Jakes spectrum.
void | add_LOS (int idx, std::complex< double > &sample)
| add LOS component to the sample with index idx

## Protected Attributes

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

## Detailed Description

IFFT type Fading generator class.

Author
  Tony Ottosson and Adam Piatyszek

A IFFT generator is a frequency domain filter implementation of filter method for generation of a fading process. Parameters that define the generator is the normalized Doppler.

The method is block-based and consecutive blocks are independent fading. The method is very efficient for large blocks. The size of the FFT, , is given by the nearest higher integer power of two that is larger than no_samples. For small blocks the FFT size is increased to keep a good accuracy (at least 10 samples in the representation of the Doppler spectrum). However, to keep the program reasonably efficient the largest upsampling factor is 64. Higher factors will result in a run-time error. If so, please use another method.

References:

- [Stu01] Gordon L. Stuber, Principles of mobile communication, 2nd. ed., Kluwer, 2001.
- [Rap96] Theodore S. Rappaport, Wireless communications: principles and practise, Prentice Hall, 1996.

Definition at line 602 of file channel.h.

## Constructor & Destructor Documentation

## IFFT_Fading_Generator()

itpp::IFFT_Fading_Generator::IFFT_Fading_Generator | ( | double | norm_doppler | ) |

inline

Default constructor.

Definition at line 606 of file channel.h.

References itpp::Correlated_Fading_Generator::Correlated_Fading_Generator().

## ~IFFT_Fading_Generator()

virtual itpp::IFFT_Fading_Generator::~IFFT_Fading_Generator | ( |  | ) |

inline virtual

Destructor.

Definition at line 609 of file channel.h.

## Member Function Documentation

## init()

virtual void itpp::IFFT_Fading_Generator::init | ( |  | ) |

inline virtual

Initialize the generator.

Implements itpp::Correlated_Fading_Generator.

Definition at line 612 of file channel.h.

References itpp::Fading_Generator::init_flag.

Referenced by generate().

## generate() [1/2]

void itpp::IFFT_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 468 of file channel.cpp.

References itpp::Correlated_Fading_Generator::add_LOS(), generate_Jakes(), init(), itpp::Fading_Generator::init_flag, itpp::Fading_Generator::los_power, and itpp::Correlated_Fading_Generator::time_offset.

## generate_Jakes()

void itpp::IFFT_Fading_Generator::generate_Jakes | ( | int | no_samples,
|  | cvec & | output )

protected

Generator for Jakes spectrum.

Definition at line 484 of file channel.cpp.

References itpp::ceil_i(), itpp::concat(), itpp::ifft(), it_assert, itpp::levels2bits(), itpp::linspace(), itpp::Correlated_Fading_Generator::n_dopp, itpp::norm(), itpp::pi, itpp::pow2i(), itpp::randn_c(), itpp::reverse(), itpp::zeros(), and itpp::zeros_c().

Referenced by generate().

## generate() [2/2]

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 n_dopp.

Referenced by 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 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 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.

References n_dopp.

## 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.

References los_dopp.

## 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.

References time_offset.

## 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 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, los_dopp, itpp::m_2pi, n_dopp, and time_offset.

Referenced by itpp::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), and itpp::Rice_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, los_diffuse, los_direct, and los_power.

Referenced by 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.

## set_doppler_spectrum()

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

virtual inherited

Set Doppler spectrum (for Rice fading generator).

Reimplemented in itpp::Rice_Fading_Generator.

Definition at line 86 of file channel.cpp.

References it_warning.

## set_no_frequencies()

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

virtual inherited

Set number of sine frequencies (for Rice fading generator).

Reimplemented in itpp::Rice_Fading_Generator.

Definition at line 91 of file channel.cpp.

References it_warning.

## set_rice_method()

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

virtual inherited

Set calculation method of Doppler frequencies and amplitudes (for Rice fading generator).

Reimplemented in itpp::Rice_Fading_Generator.

Definition at line 96 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.

References los_power.

## 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.

## get_doppler_spectrum()

DOPPLER_SPECTRUM itpp::Fading_Generator::get_doppler_spectrum | ( |  | ) | const

virtual inherited

Return Doppler spectrum (for Rice fading generator).

Reimplemented in itpp::Rice_Fading_Generator.

Definition at line 125 of file channel.cpp.

References it_warning.

## get_no_frequencies()

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

virtual inherited

Get number of sine frequencies (for Rice fading generator).

Reimplemented in itpp::Rice_Fading_Generator.

Definition at line 131 of file channel.cpp.

References it_warning.

## get_rice_method()

RICE_METHOD itpp::Fading_Generator::get_rice_method | ( |  | ) | const

virtual inherited

Get calculation method of Doppler frequencies and amplitudes (for Rice fading generator).

Reimplemented in itpp::Rice_Fading_Generator.

Definition at line 137 of file channel.cpp.

References it_warning.

## Member Data Documentation

## 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 add_LOS(), itpp::Rice_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate_Jakes(), get_norm_doppler(), itpp::FIR_Fading_Generator::init(), and 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 add_LOS(), Correlated_Fading_Generator(), get_LOS_doppler(), and 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 add_LOS(), Correlated_Fading_Generator(), itpp::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Rice_Fading_Generator::generate(), get_time_offset(), set_time_offset(), and 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 Fading_Generator(), itpp::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Independent_Fading_Generator::generate(), itpp::Rice_Fading_Generator::generate(), itpp::Rice_Fading_Generator::generate(), itpp::Static_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::init(), itpp::Independent_Fading_Generator::init(), itpp::Static_Fading_Generator::init(), itpp::Rice_Fading_Generator::set_doppler_spectrum(), itpp::FIR_Fading_Generator::set_filter_length(), itpp::Rice_Fading_Generator::set_no_frequencies(), itpp::Correlated_Fading_Generator::set_norm_doppler(), and itpp::Rice_Fading_Generator::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::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Independent_Fading_Generator::generate(), itpp::Rice_Fading_Generator::generate(), get_LOS_power(), itpp::Static_Fading_Generator::init(), and 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 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 set_LOS_power().

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

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

Generated on for IT++ by Doxygen 1.15.0