IT++ Logo
itpp::FIR_Fading_Generator Class Reference

FIR type Fading generator class. More...

#include <itpp/comm/channel.h>

Inheritance diagram for itpp::FIR_Fading_Generator:
itpp::Correlated_Fading_Generator itpp::Fading_Generator

Public Member Functions

 FIR_Fading_Generator (double norm_doppler, int filter_length=500)
 Default constructor.
 
virtual ~FIR_Fading_Generator ()
 Destructor.
 
virtual void set_filter_length (int filter_length)
 Set FIR filter length.
 
virtual int get_filter_length () const
 Get filter length.
 
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_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 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

vec Jakes_filter (double norm_dopp, int order=100)
 Jakes spectrum filter.
 
void add_LOS (int idx, std::complex< double > &sample)
 add LOS component to the sample with index idx
 

Protected Attributes

int fir_length
 Size of FIR filter.
 
int upsample_rate
 
MA_Filter< std::complex< double >, double, std::complex< double > > fir_filter
 Filter used for fading generation.
 
cvec left_overs
 Left-overs from upsampling.
 
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

FIR type Fading generator class.

Author
Tony Ottosson and Adam Piatyszek

A FIR generator is a linear finite impulse response (FIR) filter implementation of a filter method for generation of a fading process. Parameters that define the generator are the normalized Doppler and length of the FIR filter. The default value of filter length is 500. If the normalized Doppler frequency is lower than 0.1 an equivalent process of a higher normalized Doppler is generated and linearly interpolated.

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 536 of file channel.h.

Constructor & Destructor Documentation

◆ FIR_Fading_Generator()

itpp::FIR_Fading_Generator::FIR_Fading_Generator ( double norm_doppler,
int filter_length = 500 )

Default constructor.

Definition at line 389 of file channel.cpp.

References set_filter_length().

◆ ~FIR_Fading_Generator()

virtual itpp::FIR_Fading_Generator::~FIR_Fading_Generator ( )
inlinevirtual

Destructor.

Definition at line 542 of file channel.h.

Member Function Documentation

◆ set_filter_length()

void itpp::FIR_Fading_Generator::set_filter_length ( int filter_length)
virtual

Set FIR filter length.

Reimplemented from itpp::Fading_Generator.

Definition at line 396 of file channel.cpp.

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

Referenced by FIR_Fading_Generator().

◆ get_filter_length()

virtual int itpp::FIR_Fading_Generator::get_filter_length ( ) const
inlinevirtual

Get filter length.

Reimplemented from itpp::Fading_Generator.

Definition at line 547 of file channel.h.

◆ init()

void itpp::FIR_Fading_Generator::init ( )
virtual

◆ generate() [1/2]

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

◆ Jakes_filter()

vec itpp::FIR_Fading_Generator::Jakes_filter ( double norm_dopp,
int order = 100 )
protected

Jakes spectrum filter.

Function that generates the taps in the Jakes filter.

Parameters
orderNumber of taps in the filter
norm_doppNormalized Doppler frequency, i.e. $ f_{norm} =
f_{max} T_{s} $, where $ f_{max} $ is the actual Doppler frequency and $ T_{s} $ is the sampling interval.
Returns
A vector containing the filter taps of the Jakes filter.

Definition at line 447 of file channel.cpp.

References itpp::besselj(), itpp::concat(), itpp::elem_mult(), itpp::hamming(), itpp::m_2pi, itpp::norm(), and itpp::reverse().

Referenced by init().

◆ 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)
virtualinherited

◆ set_LOS_doppler()

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

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

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
inlinevirtualinherited

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
inlinevirtualinherited

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
inlinevirtualinherited

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

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

◆ set_LOS_power()

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

◆ set_doppler_spectrum()

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

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

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

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
inlineinherited

Get relative power of LOS component (Rice factor)

Definition at line 254 of file channel.h.

◆ get_doppler_spectrum()

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

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
virtualinherited

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
virtualinherited

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

◆ fir_length

int itpp::FIR_Fading_Generator::fir_length
protected

Size of FIR filter.

Definition at line 558 of file channel.h.

Referenced by init(), and set_filter_length().

◆ upsample_rate

int itpp::FIR_Fading_Generator::upsample_rate
protected

Upsampling rate for linear interpolation

Definition at line 559 of file channel.h.

Referenced by generate(), and init().

◆ fir_filter

MA_Filter<std::complex<double>, double, std::complex<double> > itpp::FIR_Fading_Generator::fir_filter
protected

Filter used for fading generation.

Definition at line 561 of file channel.h.

Referenced by generate(), and init().

◆ left_overs

cvec itpp::FIR_Fading_Generator::left_overs
protected

Left-overs from upsampling.

Definition at line 562 of file channel.h.

Referenced by generate().

◆ n_dopp

double itpp::Correlated_Fading_Generator::n_dopp
protectedinherited

◆ los_dopp

double itpp::Correlated_Fading_Generator::los_dopp
protectedinherited

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
protectedinherited

◆ init_flag

◆ los_power

double itpp::Fading_Generator::los_power
protectedinherited

◆ los_diffuse

double itpp::Fading_Generator::los_diffuse
protectedinherited

◆ los_direct

double itpp::Fading_Generator::los_direct
protectedinherited

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

Generated on Tue Dec 10 2024 04:49:37 for IT++ by Doxygen 1.12.0