Correlated (random) fading generator class. More...
#include <itpp/comm/channel.h>
Public Member Functions | |
| Correlated_Fading_Generator (double norm_doppler) | |
| Default constructor. | |
| virtual | ~Correlated_Fading_Generator () |
| Destructor. | |
| 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. | |
| virtual void | init ()=0 |
| Initialize the generator. | |
| 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. | |
| 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 | 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)) | |
Correlated (random) fading generator class.
Correlated fading generator class implements an abstract interface for a set of generators. Parameter that define the correlated fading process are the normalized Doppler and optionally the relative Doppler of a LOS component.
References:
| itpp::Correlated_Fading_Generator::Correlated_Fading_Generator | ( | double | norm_doppler | ) |
|
inlinevirtual |
|
virtual |
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().
|
virtual |
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.
|
virtual |
Set time offset in samples.
Reimplemented from itpp::Fading_Generator.
Definition at line 225 of file channel.cpp.
References time_offset.
|
inlinevirtual |
Return normalized Doppler.
Reimplemented from itpp::Fading_Generator.
|
inlinevirtual |
Get relative Doppler (compared to the maximum doppler) for the LOS component.
Reimplemented from itpp::Fading_Generator.
|
inlinevirtual |
Get time offset in samples.
Reimplemented from itpp::Fading_Generator.
|
virtual |
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.
|
pure virtual |
Initialize the generator.
Implements itpp::Fading_Generator.
Implemented in itpp::FIR_Fading_Generator, itpp::IFFT_Fading_Generator, and itpp::Rice_Fading_Generator.
|
pure virtual |
Generate no_samples values from the fading process.
Implements itpp::Fading_Generator.
Implemented in itpp::FIR_Fading_Generator, itpp::IFFT_Fading_Generator, and itpp::Rice_Fading_Generator.
|
protected |
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().
| cvec itpp::Fading_Generator::generate | ( | int | no_samples | ) |
Generate no_samples values from the fading process.
Definition at line 279 of file channel.cpp.
|
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 FIR filter length (for FIR fading generator)
Reimplemented in itpp::FIR_Fading_Generator.
Definition at line 81 of file channel.cpp.
References it_warning.
|
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 |
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.
|
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 |
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(), itpp::FIR_Fading_Generator::init(), and set_norm_doppler().
|
protected |
Relative Doppler on LOS component (0.7 by default)
Definition at line 425 of file channel.h.
Referenced by add_LOS(), and set_LOS_doppler().
|
protected |
Time offset in samples (time state in the generator)
Definition at line 426 of file channel.h.
Referenced by add_LOS(), itpp::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Rice_Fading_Generator::generate(), set_time_offset(), and shift_time_offset().
|
protectedinherited |
signals if generator is initialized or not
Definition at line 282 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(), itpp::Static_Fading_Generator::generate(), 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(), 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::FIR_Fading_Generator::generate(), itpp::IFFT_Fading_Generator::generate(), itpp::Independent_Fading_Generator::generate(), itpp::Rice_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 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 add_LOS(), itpp::Independent_Fading_Generator::generate(), itpp::Static_Fading_Generator::init(), and itpp::Fading_Generator::set_LOS_power().
Generated on Tue Dec 10 2024 04:49:37 for IT++ by Doxygen 1.12.0