# Simulation of Rayleigh Fading ( Clarke’s Model – sum of sinusoids method)

A multipath fading channel can be modeled as a FIR (Finite Impulse Response) filter with the following impulse response.

$$ h( \tau ; t ) = h_{0}(t) \delta ( \tau – \tau_{0}(t)) + h_{1}(t) \delta ( \tau – \tau_{1}(t)) + . . . + h_{L-1}(t) \delta ( \tau – \tau_{L-1}(t)) $$

where h(τ,t) is the time varying impulse response of the multipath fading channel having L multipaths and h_{i}(t) and τ_{i}(t) denote the time varying complex gain and excess delay of the i-th path. The above mentioned impulse response can be implemented as a FIR filter as shown below :

The channel under consideration can be modeled as a multipath fading channel in which the impulse response may follow distributions like Rayleigh distribution ( in which there is no Line of Sight (LOS) ray between transmitter and receiver) or as Rician distribution ( dominant LOS path exist between transmitter and receiver), Nagami distribution, Weibull distribution etc.

Different methods of simulation techniques were proposed to simulate/model multipath channels. Some of the models include clarke’s reference model, Jake’s model, Young’s model , filtered gaussian noise model etc.

A Rayleigh fading channel (flat fading channel) is considered in this text.For simplicity we fix the excess delays τ_{i}(t) in the above equation and we generate h_{i}(t) that follows Rayleigh distribution. In this simulation Clarke’s Rayleigh fading model is used. This model is also called mathematical reference model and is commonly considered as a computationally inefficient model compared to Jake’s Rayleigh Fading simulator.

### Theory of Rayleigh Fading:

Lets denote the complex impulse response h(t) of the flat fading channel as follows :

$$ h(t) = h_{I}(t) + jh_{Q}(t) $$

where h_{I}(t) and h_{Q}(t) are zero mean gaussian distributed. Therefore the fading envelope is Rayleigh distributed and is given by

$$ \left |h(t) \right | = \sqrt{\left |h_{I}(t) \right |^2 + \left |h_{Q}(t) \right |^2} $$

The probability density function (Rayleigh distribution) of the above mentioned amplitude response is given by

$$ f(z)=\frac{2z}{\sigma ^{2}}e^{-\frac{z^{2}}{\sigma ^{2}}} \\ where \; \sigma ^{2} = E\left ( \left | h(t) \right |^{2} \right ) $$

We will use the Clarke’s Rayleigh Fading model (given below) and check the statistical properties of the random process generated by the model against the statistical properties of Rayleigh distribution (given above).

### Clarke’s Rayleigh Fading model:

The random process of flat Rayleigh fading with M multipaths can be simulated with the sum-of-sinusoid method described as

### Simulation:

1) The rayleigh fading model is implemented as a function in matlab with following parameters:

M=number of multipaths in the fading channel, N = number of samples to generate, fd=maximum Doppler spread in Hz, Ts = sampling period.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
function [h]=rayleighFading(M,N,fd,Ts) % function to generate rayleigh Fading samples based on Clarke's model % M = number of multipaths in the channel % N = number of samples to generate % fd = maximum Doppler frequency % Ts = sampling period % Author : Mathuranathan for http://www.gaussianwaves.com %Code available in the ebook - Simulation of Digital Communication Systems using Matlab |

Check this book for full Matlab code.

Simulation of Digital Communication Systems Using Matlab – by Mathuranathan Viswanathan

2)The above mentioned function is used to generate Rayleigh Fading samples with the following values for the function arguments. M=15; N=10^5; fd=100 Hz;Ts=0.0001 second;

### Investigation of Statistical Properties of samples generated using Clarke’s model:

3) Mean and Variance of the real and imaginary parts of generated samples are

Mean of real part ~=0

Mean of imag part ~=0

Variance of real part = 0.4989 ~=0.5

Variance of imag part = 0.4989 ~=0.5

The results implies that the mean of the real and imaginary parts are same and are equal to zero.The variance of the real and imaginary parts are approximately equal to 0.5.

4)Next, the pdf of the real part of the simulated samples are plotted and compared against the pdf of Gaussian distribution (with mean=0 and variance =0.5)

5)The pdf of the generated Rayleigh fading samples are plotted and compared against pdf of Rayleigh distribution (with variance=1)

6) From 4) and 5) we confirm that the samples generated by Clarke’s model follows Rayleigh distribution (with variance = 1) and the real and imaginary part of the samples follow Gaussian distribution (with mean=0 and variance =0.5).

7) The Magnitude and Phase response of the generated Rayleigh Fading samples are plotted here.

### See also

[1]Eb/N0 Vs BER for BPSK over Rayleigh Channel and AWGN Channel

[2]Eb/N0 Vs BER for BPSK over Rician Fading Channel

[3]Performance comparison of Digital Modulation techniques

[4]BER Vs Eb/N0 for BPSK modulation over AWGN

[5]Rayleigh Fading Simulation – Young’s model

[6]Introduction to Fading Channels

[7] Chi-Squared distribution

Pingback: Eb/N0 Vs BER for BPSK over Rayleigh Channel and AWGN Channel | GaussianWaves

Pingback: Eb/N0 Vs BER for BPSK over Rician Fading Channel | GaussianWaves

Pingback: Fading channels – Rayleigh Fading | GaussianWaves

Pingback: Non-central Chi-squared Distribution | GaussianWaves