# Rayleigh fading simulator

**URL:** <https://www.ruby-forum.com/t/rayleigh-fading-simulator/239499>\
**Category:** GNU Radio\
**Created:** [March 1, 2014, 4:37pm UTC](https://www.ruby-forum.com/t/rayleigh-fading-simulator/239499 "2014-03-01T16:37:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [March 1, 2014, 4:37pm UTC](https://www.ruby-forum.com/t/rayleigh-fading-simulator/239499/1 "2014-03-01T16:37:04Z")

</div>

Helo all,

I need your help for simulation of the Rayleigh fading.  
I know that I can use GNURADIO channel models, but I need to know how  
they simulated.  
For example I am looking into the ‘fading\_model\_impl.cc’ in channel  
models of GNURADIO.  
Can someone tell me how this is simulated?

I heard some people also developed it on their own, but I am not sure if  
that is available and supported by you.

---

<div class="post-metadata">

**Author:** ![nesazeri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@nesazeri](https://www.ruby-forum.com/u/nesazeri)\
**Post date:** [March 2, 2014, 3:27pm UTC](https://www.ruby-forum.com/t/rayleigh-fading-simulator/239499/2 "2014-03-02T15:27:52Z")

</div>

On 03/01/2014 04:35 PM, Nasi wrote:

> Helo all,
> 
> I need your help for simulation of the Rayleigh fading.  
> I know that I can use GNURADIO channel models, but I need to know how  
> they simulated.  
> For example I am looking into the ‘fading\_model\_impl.cc’ in channel  
> models of GNURADIO.  
> Can someone tell me how this is simulated?

Can you specify what you want to do? I don’t understand the question.  
If you connect this block to your signal, it will “simulate” the  
channel.

> I heard some people also developed it on their own, but I am not sure if  
> that is available and supported by you.

Developed their own what? Channels?  
You can configure these channels to different types of scenarios.

M

---

<div class="post-metadata">

**Author:** ![nesazeri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@nesazeri](https://www.ruby-forum.com/u/nesazeri)\
**Post date:** [March 2, 2014, 6:27pm UTC](https://www.ruby-forum.com/t/rayleigh-fading-simulator/239499/3 "2014-03-02T18:27:22Z")

</div>

Martin,

it is so simple, I try to explain again:

my question is how you add Doppler to the channel (the code)?

Different people add it in a different way like using FIR or IIR  
filters. So, I am wondering if you used IIR filter or FIR. If you know  
of course, how you coded it?

Воскресенье, 2 марта 2014, 15:26 +01:00 от Martin B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![nesazeri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@nesazeri](https://www.ruby-forum.com/u/nesazeri)\
**Post date:** [March 5, 2014, 8:58pm UTC](https://www.ruby-forum.com/t/rayleigh-fading-simulator/239499/4 "2014-03-05T20:58:28Z")

</div>

Hi Nasi,

when I checked the fading models supplied in GNU Radio 3.7 the other  
week  
they seemed to be generating nasty glitches in their output. You could  
instead take a look at ‘my’ custom block for doing simple single path  
configurable doppler Rayleigh fading. The output of this has been  
statistically validated against the theoretical Rayleigh distribution. I  
can provide further details of the validations that have been done if  
required. There is a version of the block for both GNURadio 3.6 and 3.7  
API’s. This block works fine when instantiated singly, however if you  
try  
and build a multipath fading model out of it by instantiating more than  
one  
of these blocks (with delays) at the python level then the whole thing  
tends to seg fault, for as yet undetermined reasons.

You are welcome to give it a try however.

Here is the link to the GNU Radio 3.7 version of the block,

> **[GitHub - hawk2050/gr-rccBlocks: GNU Radio 3.7 API compatible version of the...](https://github.com/hawk2050/gr-rccBlocks)**
>
> GNU Radio 3.7 API compatible version of the rayleigh Fading block - GitHub - hawk2050/gr-rccBlocks: GNU Radio 3.7 API compatible version of the rayleigh Fading block

Feedback welcome

Cheers  
Richard

---

<div class="post-metadata">

**Author:** ![nesazeri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@nesazeri](https://www.ruby-forum.com/u/nesazeri)\
**Post date:** [March 7, 2014, 12:13pm UTC](https://www.ruby-forum.com/t/rayleigh-fading-simulator/239499/5 "2014-03-07T12:13:06Z")

</div>

Hi Richard,

Thanks a lot!

Statistical validation can be correct for different Doppler  
implementations in general.  
However the way they add Doppler shifts is different.

I took your code and implemented in matlab and compared with jakes model  
of matlab’s rayleighchan function.  
There is a big mismatch in how they add Doppler shift from sample to  
sample. May be this is an interpolation/filter issue.  
This happens when I add Doppler shift in a deterministic way. I keep the  
phase constant and time coherent.  
After that I take a look at the Doppler shift that the methods add. As  
an input I take ones to see the difference.

You know better than me how Doppler is added from sample to sample.  
Especially, for a short time period (coherent time) within one OFDM  
symbol the Doppler shift is linear.  
At least we can assume that it is almost linear which we should not feel  
the difference too much.  
Classical Doppler models like Jakes model would represent this property.

Now I am trying to test it in reality and find out how it is added to  
the input data from sample to sample.  
And which model is better to take into account. I need it since I am  
trying to compensate it back in the receiver as a part of my research  
work.

I will appreciate your comments on this.

## Best,

Nasimi

Четверг, 6 марта 2014, 8:56 +13:00 от Richard C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
