One of known models for channel simulation is called Rayleigh Fading channel, it's usually used to simulate wireless channel in time variant/invariant.

As I know, Rayleigh fading channel can be considered as sum of two Gaussian random variables, we can use the below command to generate that channel:

h = 1/sqrt(2)*[randn(1,M+1) + 1i*randn(1,M+1)];   

Where M is channel length and h will be the channel.

But what's about if I want to generate Rayleigh channel in time-variant environment? is that possible? Please correct me if the above command generates Rayleigh channel or there is another command.

thank you

  • 2
    $\begingroup$ I will only comment as this is from the top of my head rather than best established practices which I know exist. To simulate a Rayleigh channel use the central limit theorem to generate multiple randomly selected paths and sum them--- this is what an FIR filter does. So use a complex FIR filter with a tap spacing consistent with your sampling rate with enough samples to exceed your simulated delay spread and assign coefficients (I and Q as it is a complex filter) from a random distribution. $\endgroup$ Nov 5, 2018 at 13:13
  • 1
    $\begingroup$ Given enough taps the resulting waveform will have a Gaussian distributed amplitude in both I and Q (from the central limit theorem), and a uniformly distributed phase-which is the result of a Rayleigh channel (as the MAGNITUDE of the complex samples will be Rayleigh distributed for such a waveform). To make time varying, update the taps consistent with the time variation desired. $\endgroup$ Nov 5, 2018 at 13:13
  • $\begingroup$ This may also help: dsp.stackexchange.com/questions/51902/… $\endgroup$ Nov 5, 2018 at 13:14
  • $\begingroup$ If you have the communications toolbox, then you can use comm.RayleighChannel(). $\endgroup$
    – Tendero
    Nov 5, 2018 at 13:26
  • $\begingroup$ @Tendero I tried to use that, I have communications toolbox, but how can I set the length of channel? for example I need the channel length to be 64, how can I set that? could you please provide me with details ? $\endgroup$ Nov 5, 2018 at 14:26

1 Answer 1


Yes, you can have time variant channel in MATLAB either by using comm.RayleighChannel() , you can read about it in help of matlab.

or the other way you use the same command you have mentioned but with each symbol the channel should be changed. so it will be like you will generate a channel which is Quasi-static. You above command will become:

h = 1/sqrt(2)*[randn(n_symbol,M+1) + 1i*randn(n_symbol,M+1)];    

where n_symbol represents the number of symbols you have. then to do the convolution, must be use the loop of for.

for jj = 1:nSym

  new_signal(jj,:) = conv(h(jj,:),x(jj,:));   %% x is your signal


good luck


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.