FIR type Fading generator class. More...
#include <itpp/comm/channel.h>
Public Member Functions | |
FIR_Fading_Generator (double norm_doppler, int filter_length=500) | |
Default constructor. More... | |
virtual | ~FIR_Fading_Generator () |
Destructor. More... | |
virtual void | set_filter_length (int filter_length) |
Set FIR filter length. More... | |
virtual int | get_filter_length () const |
Get filter length. More... | |
virtual void | init () |
Initialize the generator. More... | |
virtual void | generate (int no_samples, cvec &output) |
Generate no_samples values from the fading process. More... | |
virtual void | generate (int no_samples, cvec &output)=0 |
Generate no_samples values from the fading process. More... | |
virtual void | generate (int no_samples, cvec &output)=0 |
Generate no_samples values from the fading process. More... | |
cvec | generate (int no_samples) |
Generate no_samples values from the fading process. More... | |
virtual void | set_norm_doppler (double norm_doppler) |
Set normalized Doppler. More... | |
virtual void | set_LOS_doppler (double relative_doppler) |
Set relative Doppler (compared to the maximum Doppler) for the LOS component. More... | |
virtual void | set_time_offset (int offset) |
Set time offset in samples. More... | |
virtual double | get_norm_doppler () const |
Return normalized Doppler. More... | |
virtual double | get_LOS_doppler () const |
Get relative Doppler (compared to the maximum doppler) for the LOS component. More... | |
virtual double | get_time_offset () const |
Get time offset in samples. More... | |
virtual void | shift_time_offset (int no_samples) |
Shift generator time offset by a number of samples. More... | |
void | set_LOS_power (double relative_power) |
Set relative LOS power. More... | |
virtual void | set_doppler_spectrum (DOPPLER_SPECTRUM spectrum) |
Set Doppler spectrum (for Rice fading generator) More... | |
virtual void | set_no_frequencies (int no_freq) |
Set number of sine frequencies (for Rice fading generator) More... | |
virtual void | set_rice_method (RICE_METHOD method) |
Set calculation method of Doppler frequencies and amplitudes (for Rice fading generator) More... | |
double | get_LOS_power () const |
Get relative power of LOS component (Rice factor) More... | |
virtual DOPPLER_SPECTRUM | get_doppler_spectrum () const |
Return Doppler spectrum (for Rice fading generator) More... | |
virtual int | get_no_frequencies () const |
Get number of sine frequencies (for Rice fading generator) More... | |
virtual RICE_METHOD | get_rice_method () const |
Get calculation method of Doppler frequencies and amplitudes (for Rice fading generator) More... | |
Protected Member Functions | |
vec | Jakes_filter (double norm_dopp, int order=100) |
Jakes spectrum filter. More... | |
void | add_LOS (int idx, std::complex< double > &sample) |
add LOS component to the sample with index idx More... | |
Protected Attributes | |
int | fir_length |
Size of FIR filter. More... | |
int | upsample_rate |
MA_Filter< std::complex< double >, double, std::complex< double > > | fir_filter |
Filter used for fading generation. More... | |
cvec | left_overs |
Left-overs from upsampling. More... | |
double | n_dopp |
Normalized maximum Doppler frequency. More... | |
double | los_dopp |
Relative Doppler on LOS component (0.7 by default) More... | |
double | time_offset |
Time offset in samples (time state in the generator) More... | |
bool | init_flag |
signals if generator is initialized or not More... | |
double | los_power |
Relative power of LOS component compared to diffuse component (K factor) More... | |
double | los_diffuse |
Diffuse component: sqrt(1 / (1 + los_power)) More... | |
double | los_direct |
Direct component: sqrt(los_power / (1 + los_power)) More... | |
FIR type Fading generator class.
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:
itpp::FIR_Fading_Generator::FIR_Fading_Generator | ( | double | norm_doppler, |
int | filter_length = 500 |
||
) |
|
inlinevirtual |
|
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().
|
inlinevirtual |
Get filter length.
Reimplemented from itpp::Fading_Generator.
|
virtual |
Initialize the generator.
Implements itpp::Correlated_Fading_Generator.
Definition at line 404 of file channel.cpp.
References fir_filter, fir_length, Jakes_filter(), itpp::Correlated_Fading_Generator::n_dopp, itpp::randn_c(), itpp::MA_Filter< T1, T2, T3 >::set_coeffs(), and upsample_rate.
Referenced by generate().
|
virtual |
Generate no_samples values from the fading process.
Implements itpp::Correlated_Fading_Generator.
Definition at line 423 of file channel.cpp.
References itpp::Correlated_Fading_Generator::add_LOS(), itpp::ceil_i(), itpp::concat(), fir_filter, init(), itpp::Fading_Generator::init_flag, left_overs, itpp::Fading_Generator::los_power, itpp::randn_c(), itpp::Correlated_Fading_Generator::time_offset, and upsample_rate.
|
protected |
Jakes spectrum filter.
Function that generates the taps in the Jakes filter.
order | Number of taps in the filter |
norm_dopp | Normalized Doppler frequency, i.e. ![]() ![]() ![]() |
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().
|
virtual |
Generate no_samples values from the fading process.
Implements itpp::Correlated_Fading_Generator.
|
virtual |
Generate no_samples values from the fading process.
Implements itpp::Correlated_Fading_Generator.
cvec itpp::Fading_Generator::generate | ( | int | no_samples | ) |
Generate no_samples values from the fading process.
Definition at line 418 of file channel.cpp.
|
virtualinherited |
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().
|
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.
|
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.
|
inlinevirtualinherited |
Return normalized Doppler.
Reimplemented from itpp::Fading_Generator.
|
inlinevirtualinherited |
Get relative Doppler (compared to the maximum doppler) for the LOS component.
Reimplemented from itpp::Fading_Generator.
|
inlinevirtualinherited |
Get time offset in samples.
Reimplemented from itpp::Fading_Generator.
|
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.
|
protectedinherited |
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 itpp::Rice_Fading_Generator::generate(), generate(), and itpp::IFFT_Fading_Generator::generate().
|
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().
|
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.
|
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.
|
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.
|
inlineinherited |
|
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.
|
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.
|
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.
|
protected |
Size of FIR filter.
Definition at line 558 of file channel.h.
Referenced by init(), and set_filter_length().
|
protected |
Upsampling rate for linear interpolation
Definition at line 559 of file channel.h.
Referenced by generate(), and init().
|
protected |
Filter used for fading generation.
Definition at line 561 of file channel.h.
Referenced by generate(), and init().
|
protected |
|
protectedinherited |
Normalized maximum Doppler frequency.
Definition at line 424 of file channel.h.
Referenced by itpp::Correlated_Fading_Generator::add_LOS(), itpp::Rice_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate_Jakes(), init(), and itpp::Correlated_Fading_Generator::set_norm_doppler().
|
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().
|
protectedinherited |
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(), itpp::Rice_Fading_Generator::generate(), generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Correlated_Fading_Generator::set_time_offset(), and itpp::Correlated_Fading_Generator::shift_time_offset().
|
protectedinherited |
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(), itpp::Rice_Fading_Generator::generate(), generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Static_Fading_Generator::init(), itpp::Rice_Fading_Generator::set_doppler_spectrum(), 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().
|
protectedinherited |
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(), itpp::Rice_Fading_Generator::generate(), generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Static_Fading_Generator::init(), and itpp::Fading_Generator::set_LOS_power().
|
protectedinherited |
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().
|
protectedinherited |
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().
Generated on Tue Jan 24 2023 00:00:00 for IT++ by Doxygen 1.9.5