38 #include <itpp/itexports.h>
194 ITU_Vehicular_A, ITU_Vehicular_B, ITU_Pedestrian_A, ITU_Pedestrian_B,
195 COST207_RA, COST207_RA6,
196 COST207_TU, COST207_TU6alt, COST207_TU12, COST207_TU12alt,
197 COST207_BU, COST207_BU6alt, COST207_BU12, COST207_BU12alt,
198 COST207_HT, COST207_HT6alt, COST207_HT12, COST207_HT12alt,
199 COST259_TUx, COST259_RAx, COST259_HTx
213 Jakes = 0, J = 0, Classic = 0, C = 0,
214 GaussI = 1, Gauss1 = 1, GI = 1, G1 = 1,
215 GaussII = 2, Gauss2 = 2, GII = 2, G2 = 2
237 void set_LOS_power(
double relative_power);
239 virtual void set_LOS_doppler(
double relative_doppler);
241 virtual void set_time_offset(
int offset);
243 virtual void set_filter_length(
int filter_length);
245 virtual void set_norm_doppler(
double norm_doppler);
249 virtual void set_no_frequencies(
int no_freq);
256 virtual double get_LOS_doppler()
const;
258 virtual double get_time_offset()
const;
260 virtual int get_filter_length()
const;
262 virtual double get_norm_doppler()
const;
266 virtual int get_no_frequencies()
const;
271 virtual void shift_time_offset(
int no_samples);
274 virtual void init() = 0;
277 virtual void generate(
int no_samples, cvec &output) = 0;
279 cvec generate(
int no_samples);
290 #if (!defined(_MSC_VER) || (defined(_MSC_VER) && defined (ITPP_SHARED_LIB)))
307 else is.setstate(std::ios_base::failbit);
313 template class ITPP_EXPORT Array<DOPPLER_SPECTRUM>;
314 template class ITPP_EXPORT Array<Fading_Generator*>;
337 virtual void init() { init_flag =
true; }
342 virtual void generate(
int no_samples, cvec& output);
369 virtual void generate(
int no_samples, cvec& output);
374 double static_sample_im;
399 virtual void set_norm_doppler(
double norm_doppler);
401 virtual void set_LOS_doppler(
double relative_doppler);
403 virtual void set_time_offset(
int offset);
413 virtual void shift_time_offset(
int no_samples);
416 virtual void init() = 0;
421 virtual void generate(
int no_samples, cvec& output) = 0;
429 void add_LOS(
int idx, std::complex<double>& sample);
479 virtual void set_no_frequencies(
int no_freq);
496 virtual void generate(
int no_samples, cvec &output);
506 vec f1, f2, c1, c2, th1,
th2;
545 virtual void set_filter_length(
int filter_length);
555 virtual void generate(
int no_samples, cvec &output);
574 vec Jakes_filter(
double norm_dopp,
int order = 100);
612 virtual void init() { init_flag =
true; }
617 virtual void generate(
int no_samples, cvec &output);
621 void generate_Jakes(
int no_samples, cvec &output);
707 void set_channel_profile(
const vec &avg_power_dB,
const vec &delay_prof);
717 void set_LOS(
int tap_number,
double relative_power,
double relative_doppler = 0.7);
719 void set_LOS(
const vec& relative_power,
const vec& relative_doppler =
"");
722 void get_channel_profile(vec &avg_power_dB, vec &delay_prof)
const;
736 double get_LOS_power(
int tap_number)
const {
return los_power(tap_number); }
741 int taps()
const {
return N_taps; }
744 double calc_mean_excess_delay()
const;
746 double calc_rms_delay_spread()
const;
861 TDL_Channel(
const vec &avg_power_dB =
"0",
const ivec &delay_prof =
"0");
868 void set_channel_profile(
const vec &avg_power_dB,
const ivec &delay_prof);
870 void set_channel_profile_uniform(
int no_taps);
872 void set_channel_profile_exponential(
int no_taps);
882 void set_norm_doppler(
double norm_doppler);
885 void set_LOS(
const vec& relative_power,
const vec& relative_doppler =
"");
887 void set_LOS_power(
const vec& relative_power);
889 void set_LOS_doppler(
const vec& relative_doppler);
896 void set_no_frequencies(
int no_freq);
899 void set_time_offset(
int offset);
901 void shift_time_offset(
int no_samples);
904 void set_filter_length(
int filter_length);
908 int taps()
const {
return N_taps; }
911 void get_channel_profile(vec &avg_power_dB, ivec &delay_prof)
const;
913 vec get_avg_power_dB()
const;
930 double get_LOS_power(
int tap_number)
const {
return los_power(tap_number); }
938 double get_time_offset()
const;
941 double calc_mean_excess_delay()
const;
943 double calc_rms_delay_spread()
const;
949 void generate(
int no_samples,
Array<cvec> &channel_coeff);
951 void generate(
int no_samples, cmat &channel_coeff);
954 void filter_known_channel(
const cvec &input, cvec &output,
const Array<cvec> &channel_coeff);
956 void filter_known_channel(
const cvec &input, cvec &output,
const cmat &channel_coeff);
961 void filter(
const cvec &input, cvec &output, cmat &channel_coeff);
965 cvec
filter(
const cvec &input, cmat &channel_coeff);
967 void filter(
const cvec &input, cvec &output);
969 cvec
filter(
const cvec &input);
972 void operator()(
const cvec &input, cvec &output,
Array<cvec> &channel_coeff);
974 void operator()(
const cvec &input, cvec &output, cmat &channel_coeff);
976 cvec operator()(
const cvec &input,
Array<cvec> &channel_coeff);
978 cvec operator()(
const cvec &input, cmat &channel_coeff);
980 cvec operator()(
const cvec &input);
986 void calc_frequency_response(
const Array<cvec> &channel_coeff,
Array<cvec> &frequency_response,
const int fft_size);
988 void calc_frequency_response(
const cmat &channel_coeff, cmat &frequency_response,
const int fft_size);
1014 void discretize(
const vec &delay_profile);
1041 BSC(
double in_p = 0.0) : u(0.0, 1.0) { p = in_p; };
1047 bvec operator()(
const bvec &input);
1098 cvec operator()(
const cvec &input);
1100 vec operator()(
const vec &input);
1111 #endif // #ifndef CHANNEL_H