Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#76 Error in Rayleigh Channel Model

release_3.7.x
closed
None
5
2012-09-15
2004-06-30
Oliver K
No

Hi,

I discovered a potential bug in the Rayleigh_Channel.

Rayleigh_Channel my_channel;
noise_var = 0.0;
my_channel.set_noise(noise_var);
norm_dopp = 50/3.84e6;
my_channel.set_doppler(norm_dopp);
Nsamples = 38400;
my_channel.create_channel(Nsamples, chan);

When I run above code with fd=60Hz it works fine, i.e.
amplitude variations and phase rotation.
However, going down to 50Hz, all channel symbols will
be the same! (I also noticed that the border of
working/not working changes with Nsamples -> less
Nsamples requires higher doppler and vice versa).

Additionally, I tried to use Jake-filter generator:
Rayleigh_Channel my_channel(0.0,0.0,1000,1);

However, this is not working at all, since it will exit with
*** Assertation failed in comm/channel.cpp on line 352:
Rayleigh_Channel::filter. Wrong size (channel.size() ==
input.size())

which cannot be avoided since jakeinput and jfilttaps are
obviously of different size:
void Rayleigh_Channel::create_channel(int no_samples,
cvec &channel)
...
cvec jakeinput = randn_c((int)std::ceil(double
(no_samples)/upsamp)+jfiltord+2);
vec jfilttaps = jake_filter(normdopp*upsamp,jfiltord);
cvec jakeoutput = filter(to_cvec(jfilttaps),jakeinput);

Best regards
Oliver

Discussion

  • Oliver K
    Oliver K
    2004-06-30

    Logged In: YES
    user_id=628748

    I did some more investigation and found a solution for the FFT
    based algorithm.
    The problem occurs when noisesamp is less or equal to 1.
    Hence we could adapt Nfft if this occurs:

      vec Fpos;
      vec F;
      vec S;
      double df = 1.0/double(Nfft);
      int noisesamp = (int)std::ceil(normdopp/df);
    
      while (noisesamp<=1) {
        Nfft *= 2;
        df = 1.0/double(Nfft);
        noisesamp = (int)std::ceil(normdopp/df);
      }
      Fpos = linspace(0,0.5,Nfft/2+1);
      F = concat(Fpos, reverse(-Fpos(1,Nfft/2-1)));
      S = zeros(Nfft);
    
     
  • Logged In: YES
    user_id=326034

    This has been fixed according to the proposal and checked
    into CVS for inclusion in next release.

    /Tony