1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 4.71 out of 5)
Loading ... Loading ...
Print Print

Rayleigh multipath channel model

by Krishna Sankar on July 14, 2008

The article gives a quick overview of a simple statistical multipath channel model called Rayleigh fading channel model.

Multipath environment

In a multipath environment, it is reasonably intuitive to visualize that an impulse transmitted from transmitter will reach the receiver as a train of impulses.

Figure: Impulse response of a multipath channel

Let the transmit bandpass signal be,
, where

is the baseband signal,
is the carrier frequency and
is the time.

As shown above, the transmit signal reaches the receiver through multiple paths where the path has an attenuation and delay . The received signal is,

.

Plugging in the equation for transmit baseband signal from the above equation,

.

The baseband equivalent of the received signal is,

,

where is the phase of the path.

The impulse response is,

.

Rayleigh fading model

The phase of each path can change by radian when the delay changes by . If is large, relative small motions in the medium can cause change of radians. Since the distance between the devices are much larger than the wavelength of the carrier frequency, it is reasonable to assume that the phase is uniformly distributed between 0 and radians and the phases of each path are independent (Sec 2.4.2 [WIRELESS-COMMUNICATION: TSE, VISWANATH]).

When there are large number of paths, applying Central Limit Theorem, each path can be modelled as circularly symmetric complex Gaussian random variable with time as the variable. This model is called Rayleigh fading channel model.

A circularly symmetric complex Gaussian random variable is of the form,

,

where real and imaginary parts are zero mean independent and identically distributed (iid) Gaussian random variables. For a circularly symmetric complex random variable ,

.

The statistics of a circularly symmetric complex Gaussian random variable is completely specified by the variance,

.

The magnitude which has a probability density,

is called a Rayleigh random variable.

This model, called Rayleigh fading channel model, is reasonable for an environment where there are large number of reflectors.

Reference

[WIRELESS-COMMUNICATION: TSE, VISWANATH] Fundamentals of Wireless Communication, David Tse, Pramod Viswanath
Note:
In a future post, we will try and derive the probability density function of sum of squares of independent Gaussian random variables

Please click here to SUBSCRIBE to newsletter and download the FREE e-Book on probability of error in AWGN. Thanks for visiting! Happy learning.

Related posts

  1. BER for BPSK in OFDM with Rayleigh multipath channel
  2. BER for BPSK in Rayleigh channel
  3. Deriving PDF of Rayleigh random variable
  4. Equal Gain Combining (EGC)
  5. Transmit beamforming

D id you like this article? Make sure that you do not miss a new article by subscribing to RSS feed OR subscribing to e-mail newsletter. Note: Subscribing via e-mail entitles you to download the free e-Book on BER of BPSK/QPSK/16QAM/16PSK in AWGN.

{ 5 trackbacks }

BER for BPSK in Rayleigh channel
August 10, 2008 at 8:51 pm
Receiver diversity - selection diversity
September 6, 2008 at 2:44 pm
Receiver diversity - Equal Gain Combining (EGC)
September 23, 2008 at 9:47 pm
MIMO with Zero Forcing equalizer
November 2, 2008 at 12:04 pm
Six equalizers for V-BLAST
August 10, 2009 at 8:01 pm

{ 130 comments… read them below or add one }

1 Lealem Tamirat July 14, 2008 at 10:39 am

Hello! Sir
i have tried to read the Rayleigh fading channel model,but do you have a matlab code to simulate and test ,this fading channel over a wirelees environment.particularly QAM,16-QAM,
…..or Over an OFDM system.performanve of M-QAM modulation over a rayleigh fading channel(i.e SNR Vs BER).
Thank you!

Reply

2 Krishna Pillai July 14, 2008 at 2:25 pm

@Lealem: This something which I am planning to do. Like we derived the BER for BPSK in AWGN channel, we will derive the BER for BPSK in Rayleigh fading channel and back it up with Matlab simulation scripts. This is something which I am planning to do with in the coming 7 days.

Reply

3 Ideal May 26, 2009 at 3:22 pm

Hi Krishna

can you please help me how to plot the channel impulse response. I mean for varying delay how can we plot the power delay profile for channel impulse response in matlab?

Reply

4 Krishna Pillai May 31, 2009 at 8:28 pm

@Ideal: Well, the most simplest example is
h = [1 0 0 0.2 0 0 0 0.4]; % multipath channel with 3 taps
plot(h);
If we assume that the sampling frequency of the taps is Ts, then the first and second tap are separated by 3Ts and the second and third tap are separated by 4Ts.

Does this help?

Reply

5 Lealem Tamirat July 15, 2008 at 1:07 pm

Thank you! for your response

Reply

6 Lealem Tamirat July 21, 2008 at 11:12 am

Hello! Krishna how are you today?
i just need a hint to simulate an OFDM over a time varing multipath fading fading channel(rayleigh), i have begin doing a simulation but i encounter a problem in the midle of my work. Can u please help me!
Thank you!

Reply

7 Krishna Pillai July 21, 2008 at 12:50 pm

@Lealem: Sure, please do post your question.

Reply

8 Lealem August 21, 2008 at 10:39 am

I have seen the simulation code which u used to simulate a Rayleigh fading channel. But i would like u to ask a hit how to simulate a frequency selective Rayleigh fading channel for OFDM application. I think the above simulation out put is a flat Rayleigh fading.
Thank you!!!

Reply

9 Krishna Pillai August 21, 2008 at 1:27 pm

@Lealem: Sorry for the delayed response.
Please check the reply @
http://www.dsplog.com/2008/08/10/ber-bpsk-rayleigh-channel/#comment-1151

Reply

10 Tahmid October 6, 2008 at 7:07 pm

Hi Krishna,
Have you managed to determine the BER performanve of M-QAM modulation over a rayleigh fading channel?

I understand the process of getting the BER for BPSK over the rayleigh channel, but get a bit lost when it comes to 4/8/16QAM. In particular I would like to know how to generate the coefficients and apply them to the signal.
thanks

Reply

11 Krishna Pillai October 7, 2008 at 4:59 am

@Tahmid: Though I have not written on error rate with M-QAM channel, I can point you to
http://wireless.per.nl/reference/chaptr05/digimod/fadserah.htm
The second section of the post discuss SER for M-QAM in Rayleigh fading.

Hope this helps. Once I understand the equations, I may write an article on the topic.

Reply

12 Cheb Hosni November 16, 2008 at 1:22 am

you have done a great job thank you i try to improve some methods and i will send you the results

Reply

13 Krishna Pillai November 17, 2008 at 5:44 am

@Cheb Hosni: Thanks. :)
Sure, do send in your results.

Reply

14 Abrar November 19, 2008 at 4:13 am

hi i want to produce delay in signal as i have:
N=10^6; % Bits of data_user1
data_user1= rand(1,N)>0.5; % Generation of data user1
x=data_user1
fs=1
p1=1;
p2=0.2;
p3=05;
gain1=sqrt(p1/2)*[randn(1,length(x))+ j*randn(1,length(x))];
gain2=sqrt(p2/2)*[randn(1,length(x)) + j*randn(1,length(x))];
gain3=sqrt(p3/2)*[randn(1,length(x))+ j*randn(1,length(tx))];
y=gain1*x1+gain2*X2+gain3*X3;
where
x1=x
x2=x with one sample delay
x3=x with two sample delay
can u tell me how I generate X2 and X3.
how I put delay in signal.
Thanks and Take care

Reply

15 Krishna Pillai November 19, 2008 at 4:47 am

@Abrar: That should be reasonably simple.
x1 = [x 0 0 ];
x2 = [0 x 0 ];
x3 = [0 0 x ];

The zero padding is done to ensure that the matrix dimensions are matching. Does this help?

Reply

16 rahul November 26, 2008 at 4:35 pm

sir ..
i am working on ber calculation of ofdm channel through nakagami fading channel ..
do u have some matlab code for that..
or how to generate nakagami fading channel?
thanks in advance

Reply

17 Krishna Pillai November 27, 2008 at 6:10 am

@rahul: Sorry, I have not yet tried to simulate Nakagami fading. Hopefully, the following link might be of use to you
Nakagami fading
http://wireless.per.nl/reference/chaptr03/ricenaka/nakagami.htm

All the best.

Reply

18 R.RAMYA December 15, 2008 at 4:33 pm

HELLO SIR,
I have seen the Script for simulating binary phase shift keyed transmission and reception and compare the simulated and theoretical bit error probability.

In that Matlab code i had small doubt.I the noise addition y = s + 10^(-Eb_N0_dB(ii)/20)*n; Why are U introducing 20 instead of 10 for converting Eb_No_db in db to ratioless quantity.(as power is dealt).

Waiting for your reply

thanks a lot in advance.

Reply

19 Krishna Pillai December 16, 2008 at 6:12 am

@ramya: The term Eb_N0_dB corresponds to the bit power over noise power. However when we are adding noise, we are adding the noise in the voltage domain (and not in the power domain). Hence to scale the noise voltage, we need to use 10^(-Eb_N0_dB(ii)/20). Hope this makes sense.

Reply

20 M Junaid Malik January 20, 2009 at 2:41 pm

hello
i need the code of MIMO detection technique which is named as Zero Forcing ..plz

Reply

21 Krishna Pillai January 22, 2009 at 3:25 am

@Junaid: Please refer to the post
MIMO with Zero Forcing Equalizer
http://www.dsplog.com/2008/10/24/mimo-zero-forcing/

Reply

22 R.Ramya December 15, 2008 at 4:40 pm

sir,
I was talking about BPSK BER simulation in AWGN channel.
I didnt mention it in my previous mesg.
sorry.

Reply

23 R.Ramya December 16, 2008 at 10:21 pm

Thank you for your response SIR

Reply

24 jimmy December 26, 2008 at 2:37 pm

Hi, can i do it this way:
The cdf of rayleigh distribution is
F(h) = 1 – exp(-h^2/2sigma^2)
h = sqrt(-2sigma^2 * ln(1-F(h))

I am not sure how to obtain sigma^2, so in the matlab code, i set 2sigma^2 = 1.
h = sqrt(-log(rand(1,N)));
y = h.*s + 10^(-Eb_N0_dB(ii)/20)*n;

But i obtain the result which is different from yours. Is it possible to do it this way also? And how do we obtain sigma^2? Thank you

Reply

25 Krishna Pillai December 29, 2008 at 5:36 am

@jimmy: I do not think it is possible to find the random variable from the probability of the random variable. For eg, consider a simple uniform distributed random variable from 0 to 1. Its CDF is linear between 0 and 1, but it does not mean that we can find the random variable.

Maybe you would also want to check Box Muller transform
http://en.wikipedia.org/wiki/Box-Muller_method

Hope this helps.

Reply

26 R.Ramya December 28, 2008 at 4:43 pm

Sir,
A small doubt:
CASE:
A time-invariant indoor wireless channel with LOS component at delay 23 ns, a multipath component at delay 48 ns, and another multipath component at delay 67 ns.

calculate the delay spread assuming
demodulator synchronizes to the LOS component. Repeat assuming that the demodulator synchronizes to the first multipath
component.

whether,
LOS component == first multipath component ?

Reply

27 Krishna Pillai December 29, 2008 at 5:42 am

@Ramya: In the case where demodulator synchronizes to the first multipath component, it means that we have significant energy from the pre-cursor (los component). I think, you need not treat LOS component == first multipath component. Treat it as a channel having both pre-cursor taps and post-cursor taps.

Reply

28 thiruppathi February 16, 2009 at 12:23 pm

hi sir

— I have the problem in introducing the expontial power delay profile in ofdm system — and rayleigh fadding –can you help me — i am doing project in matlab

Reply

29 Krishna Pillai February 21, 2009 at 7:17 am

@Thiruppathi: For modeling channel model with exponential power delay profile, one may look at the Naftali channel model used in 802.11 communications. The article Modeling Multpath in 802.11 Systems should provide you more insights.
http://www.commsdesign.com/article/printableArticle.jhtml?articleID=16505977

https://mentor.ieee.org/802.11/file/00/11-00-0282-00-00sb-evaluating-the-performance-of-ieee802-11-hrb-proposal-in-multipath.ppt

For Rayleigh fading you may refer to the post,
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/

Reply

30 thiruppathi February 23, 2009 at 5:56 pm

thank you so much –it is helpful my work.
i eager to ask many questions , can I

31 R.Ramya December 29, 2008 at 7:07 am

Thank you sir.

Reply

32 Bwalya January 6, 2009 at 11:27 am

Krishna

I am trying to simulate IEEE 802.22 WRAN environment for my MSc project. Network consists of a WRAN BS with 50 CPEs spread randomly within its coverage area and a TV broadcast station located further away from the WRAN environment. My aim is to get the SNR of each of the 50 CPEs due to the signal (BPSK signal) from TV station. Channel is assumed to follow Rayleigh fading distribution. How to i do this preferably in MATLAB?

Reply

33 Krishna Pillai January 10, 2009 at 9:20 am

@Bwalya: From your problem statement, it seems like you are looking for finding the path loss from BS to each of the 50 CPE’s.
For doing that, you need to know the path loss exponent in the environement. Based on the transmit power and the path loss exponent, one can find the received power. Once the received power is known, based on the noise floor of each receiver (ideally depending on noise bandwidth), SNR can be computed.
The link in wiki on path loss might be helpful
http://en.wikipedia.org/wiki/Log-distance_path_loss_model

Hope this helps.

Reply

34 Bwalya January 13, 2009 at 10:17 am

Thanks but i still have some concerns. My path loss exponent is say 3.8 but as the 50 CPEs are randomly distributed i cannot predict their distances from TV station, which are needed to get the received power for each CPE. How do i get around this? I prefer to use MATLAB.

Reply

35 Krishna Pillai January 16, 2009 at 6:02 am

@Bwalya: Maybe can you use rand() function to generate uniformly distributed random variables which is in a circle to generate the distance randomly. Small Matlab/Octave code snippet along with.
clear all; close all;
theta = 2*pi*rand(1,10^5);
mag = rand(1,10^5);
op = mag.*exp(j*theta);
plot(real(op),imag(op),’b.’)

The absolute value of op maybe used as representative of distance.
Hope this helps.

Reply

36 Bwalya January 27, 2009 at 1:50 pm

Thanks Krishna, your hint seems to have just opened my eyes. I’ll keep informed of the outcome.

37 Abrar January 19, 2009 at 10:23 am

Hi Kirshna;
I need ur help in simulating MC-CDMA.
i create the channel as i early told u in this way.
when I used one Tap i can use zeroforcing method as u described.
but when second Tap is activated lets by putting P2=0.8
Then how i make equalization at receiver.
The code is as under:

x=transdata1; % MC-CDMA BPSK Data with
%———————-Channel——————————————-
taps=2;
p1=1;
p2=0;
gain1=sqrt(p1/2)*[randn(1,length(x)) + j*randn(1,length(x))];
gain2=sqrt(p2/2)*[randn(1,length(x)) + j*randn(1,length(x))];

n=1:length(x);
delay1=1;
delay2=2;
for n=delay1+1:length(x)
x1(n)=x(n-delay1);
end
for n=delay2+1:length(x)
x2(n)=x(n-delay2);
end
transdata=gain1.*x+gain2.*x1

%————————Addition of noise ——————————-
noise = 1/sqrt(2)*[randn(1,length(x)) + j*randn(1,length(x))]; % Noise
snr = [0:10]; % multiple Eb/N0 values
ps=mean(abs(x).^2); % Power of the transmitted signal
for i = 1:length(snr)
y = transdata + (sqrt(3*ps)*10^(-snr(i)/20))*noise; %Addition of Noise
%————————————————————————-

%————————–Receiver —————————————
recdata=y;
L=length(y);
rx0=recdata.*conj(gain1); %Zeroforcing Equalization
%rx0 = 1./( gain1.*conj(gain1)+ 10^(-snr(i)/10)).*conj(gain1).*y; % mmse equalization
rx1=reshape(rx0,N,length(rx0)/N);

Reply

38 mak January 20, 2009 at 11:47 am

Dear all,

Can u plz help me for the Jitter/Delay in AWGN/Rayleigh fading channel for adaptive modulation

regds

Reply

39 Krishna Pillai January 22, 2009 at 3:33 am

@mak: I did not understand your problem statement. Can you please elaborate more.

Reply

40 Sun January 23, 2009 at 10:37 pm

Dear Krishna
Currently I do my thesis and will submit next week but until I still cannot plot rayleigh pdf apply to my model. My data measurement by array 121(11×11)points so how to plot?

I no have much skill for matlab so if you can guide me some or if possible write complete code to me that is good for me I dont know anyone more to help.

Thanks in advance

Reply

41 Krishna Pillai January 24, 2009 at 7:47 am

@Sun: You can mail me queries in the code if any. I do not prefer to write ‘complete code’ :)

Reply

42 Richard January 24, 2009 at 6:14 pm

Hola necesito ayuda, necesito simular un canal con diversidad MRC con L canales en el Receptor correlados con una mismaganancia promedio, donde el (Tcoherencia < Ttransmision), necesto representar la capacidad ergodica para L1, L4, L4., si me pueden ayudar………
GRACIAS…
aTTE. RICHARD

Reply

43 Krishna Pillai January 24, 2009 at 8:36 pm

@Richard: Can you please translate the query.

Reply

44 nebal pcm January 26, 2009 at 4:57 pm

i want a simple matlab programme to simulate pcm system 8-bites with gaussian channal and bit error rate please i need it very very quickly

Reply

45 Krishna Pillai January 27, 2009 at 6:25 am

@nebal: Sorry, I have not written posts on PCM systems.

Reply

46 akram sheriff January 28, 2009 at 7:40 pm

hai,i am doing a blind channel estimation scheme for OFDM,can u suggest a good way and please suggest how to model the channel.Do we have to model using the impulse response form,and what is channel length?

Reply

47 Krishna Pillai January 30, 2009 at 5:41 am

@akram: Sorry, I have not worked on the problem of blind channel estimation. The multipath channel is typically modelled in the time domain – using impulse response. The shape of the impulse response and the duration of the impulse response depends on the environment under consideration.

I have written a few posts on Rayleigh channel @
http://www.dsplog.com/2008/07/14/rayleigh-multipath-channel/
http://www.dsplog.com/2008/07/17/derive-pdf-rayleigh-random-variable/

Hope this helps

Reply

48 akram sheriff February 16, 2009 at 6:57 pm

Hello Krishna,i am not sure of channel length mentioned some in research papers,can you enlighten me on this aspect,and by ensuring length of c.p < channel length, ISI is avoided in OFDM,Is that so?

Reply

49 Krishna Pillai February 21, 2009 at 7:27 am

@akram: Yes, you are right. You may also look at the post BER for BPSK with OFDM in Rayleigh multipath channel.
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/
In that post, the channel is a 10-tap rayleigh channel and the OFDM system has a cyclic prefix durtion of 16. As there is no-interference, the BER performance is comparable to a flat fading Rayleigh channel simulations.

Reply

50 Benzia January 30, 2009 at 1:46 pm

Hello sir,
I need some ideas about How to calculate Avrerage SNR per symbol for plotting SER Vs Average SNR in dB? Can you help me?

Reply

51 Krishna Pillai January 31, 2009 at 6:42 am

@Benzia: Average SNR per symbol can be set by measuring the power of signal and noise over large number of symbols. I have written a post on BER for BPSK in Rayleigh channel with OFDM modulation. The signal and noise scaling in the Matlab model accompanying the post should be helpful.
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/

Hope this helps.

Reply

52 Thiruppathi February 16, 2009 at 10:41 am

hi sir,

I doing project in channel estimation using block and comb type pilot pattern(ofdm_system).

i facing problem in introducing the channel effects

can you help me how to introduce the doppler effect and rayleigh fadding;

Reply

53 Krishna Pillai February 21, 2009 at 7:12 am

@Thiruppathi: I have not tried doppler, but I can provide you a pointer to Rayleigh fading.
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/
In that post, I convolve OFDM transmission with a 10tap rayliegh channel and equalize for the channel and compute BER.
I assume that the channel is known at the receiver. In your case, you made do channel estimation and use the estimated channel for equalization.

Reply

54 thiruppathi February 12, 2009 at 5:56 pm

how to simulate the rayleigh with doppler

Reply

55 Krishna Pillai February 19, 2009 at 6:03 am

@thiruppathi: I have not written posts on modeling doppler effects. Maybe I should do. Will do so in future.

Reply

56 thiruppathi February 12, 2009 at 6:39 pm

hi sir

i am doing channel estimation using pilot tone in ofdm system– i wrote the code for estimation– and i used rayleigh fadding
ray=randin(1,n_tab)+j*randin(1,n_tab);
now i have to introduc the doppler shift
i.e — d= doppler frequncy/subcarrier spacing; doppler shift=exp(j*2*pi*d);
is it correct? and i have to plot BER vs various doppler frequncy — BER GET WORSE WHEN DOPPLER FREQUNCY IS MORE — IS THERE ANY DIFFERNCE BW DOPPLER SHIFT AND DOPPLER SPREAD — and i used exponential power delay profile A= exp(-k/10) k=0:L-1;
L =CHANNEL PATH — I USED IN TIME DOMAIN — AND I USED CONV(OFDM_SIGNAL ,A) — IS IT COORECT OR I HAVE TAKE FFT AND MULTI WITH FREQ DOMAIN

Reply

57 Ram February 13, 2009 at 5:41 pm

Hi thiruppathi,

You are designing a time-variant..
Rayleigh fading channel is time-variant channel…
How can you convolute if you are using time invariant channel..
It’s just my doubt…

Reply

58 Thiruppathi February 16, 2009 at 10:35 am

hi sir

I used block and comb type pilot pattern to estimate the channel;

so i have coded like this
for i:sb(1)%sb(1)=numberof ofdmsysmbols
chan=randin(1,n_tab)+j(randin(1,n_tab)
xht = ofdm_symc(i,:);
xht=conv(ht,xht);
end

is it correct?

Reply

59 Krishna Pillai February 21, 2009 at 7:10 am

@Thiruppathi: Infact you do need to do convolution for each ofdm symbol. You can take the full vector (which is the concatenation of several ofdm symbol) and convolve that with channel ht.

Reply

60 Krishna Pillai February 19, 2009 at 6:04 am

@thiruppathi: My replies:
1. Am not familiar with modeling doppler. Hence not commenting.
2. Yes, BER getting worse with higher doppler frequency is expected :)
3. conv(ofdm_signal, channel) is correct.

Reply

61 thiruppathi February 19, 2009 at 4:58 pm

thank you sir, i have one more doubt.
How to model a Rayleigh time varying fading channnel;

expontial power delay profile with rayleigh fading is
d=exp(-(1:L);L = number of paths
ray=d+i*d ;
is it correct?

Reply

62 Krishna Pillai February 20, 2009 at 5:35 am

@thiruppathi: Well, I think, to model time varying channel you might need to do multiple convolution on the packets. For eg, the first chunk of time you do convolutional with a channel, the for the next chunk of time, you convolute with another channel.

Reply

63 thiruppathi February 19, 2009 at 5:03 pm

Thank you sir,
i have one more doubt — how to model the rayleigh time vaying fading in ofdm system ( time variation within ofdm symbol;
and

i have coded for this spcifications
channel =rayleigh,
expontial power delay tabs
d=exp(-(1:L) L- number of tabs
ray=d+j*d;
is it correct?

Reply

64 Charly February 12, 2009 at 9:55 pm

Hi Krishna,

I’m making some simulations in Matlab (trying to obtain a MIMO SNR stimation from a SISO SNR, without any geometrical information).

I make the assumption than we where indoor and the channel can be modeled like a Rayleigh distribution. After check several codes all the people is making a channel Matrix (H) with the rand function, what about the raylrnd function?

I’m trying with this function but I don’t know what sigma I need to use. You can help in find this value? (or any idea to get 4 diferent SNR streams (4×4 MIMO) from one SNR stream (SISO).

Thank you in advance

Reply

65 Krishna Pillai February 20, 2009 at 5:45 am

@Charly: In the simulations, which I did, I defined a flat fading Rayleigh channel comprised Gaussian distributed real and imaginary components. h = 1/sqrt(2)*(randn(1,N) + j*randn(1,N)).
The 1/sqrt(2) factor helps to make the variance of h as unity.

Since I do not have Matlab, I do not have the function raylrand. However, from a quick googling obtained the following links:
(a) http://www.mathworks.com/access/helpdesk/help/toolbox/stats/index.html?/access/helpdesk/help/toolbox/stats/raylrnd.html
(b) http://www.dsprelated.com/showmessage/260/1.php

From (b), “raylrnd function implements “abs(randn(1,N)+j*randn(1,N))” for sigma =1 instead of
abs(sqrt(0.5)*(randn(1,N)+j*randn(1,N))).”

Hope this helps.

Reply

66 Charly February 12, 2009 at 10:05 pm

Sorry, I forget to put some code.

To simulate the fadding I use this code:

ray = (raylrnd(b, n_r, n_t) + sqrt(-1) * raylrnd(b, n_r, n_t)) / sqrt(2);

Where n_r/n_t is the number of receive/transmit antennas (to generate the matrix) and b is the sigma of the rayleigh distribution.

The definition of the command raylrnd is:
R= raylrnd(B,m,n) returns a matrix of random numbers chosen from the Rayleigh distribution with parameter B, where scalars m and n are the row and column dimensions of R.

I don’t know what B parameter I need to put.

Thanks

Reply

67 akram sheriff February 16, 2009 at 7:16 pm

Then another thing krishna,is it possible to go for blind channel estimation using LS technique?,it would b very helpful if you can clarify on this as i am stuck up in the middle of proj phase

Reply

68 Krishna Pillai February 21, 2009 at 7:27 am

@akram: Sorry, I have not worked on blind channel estimation.

Reply

69 JORGE February 24, 2009 at 11:45 pm

Hi sir

I want to simulate measures in the time in a static receiver and I need to know how us the “raylrnd function” in MATLAB.
I don’t understand The Help in MATLAB because I get big numbers.
Also I think the “lognrnd function” is more easy to use so it is correct to use the “lognrnd function” instead of the “raylrnd function” in MATLAB?.

P.D Sorry for my spelling mistakes. Thank you

Reply

70 Krishna Pillai February 26, 2009 at 6:09 am

@jorge: To model Rayleigh channel, I typically use a complex Gaussian noise
h = 1/sqrt(2)*(randn(1,N) + j*randn(1,N)).
From a quick googling obtained the following links about raylrand
(a) raylrand help page in Mathworks
(b) http://www.dsprelated.com/showmessage/260/1.php

From (b), “raylrnd function implements “abs(randn(1,N)+j*randn(1,N))” for sigma =1 instead of
abs(sqrt(0.5)*(randn(1,N)+j*randn(1,N))).”

Hope this helps.

Reply

71 SYED March 1, 2009 at 12:10 pm

can give d code for rayleigh fadind channel model

Reply

72 Krishna Pillai March 5, 2009 at 4:25 am
73 SYED March 1, 2009 at 12:11 pm

can u send me the rayleighb fadind channel matlad simu codes

Reply

74 invizible March 4, 2009 at 5:54 pm

Dear Krishna i hope you are doing fine … i am simulating an OFDM system … i obtained the curves for BER without the introduction of any channel model … now I want to run my simulations by introducing a PROAKIS B CHANNEL … but the problem is i dont have much idea of this model…can you kindly give me an overview or helpful resource from where i can get an idea about this channel? and how can i simulate it in matlab …
i shall be very grateful

Reply

75 Krishna Pillai March 5, 2009 at 5:44 am

@invizible: Sorry, I do not have references for Proakis channel model. The closest I found is that its a 3 tap rayleigh channel (from here)

One may also look at Naftali channel model

Reply

76 nataraj March 13, 2009 at 3:06 pm

i am working on channel simulation in wireless communication can i get your help
for my research

Prof nataraj

thanks and regards

Reply

77 Krishna Pillai March 21, 2009 at 7:50 am

@nataraj: I have not worked much on channel modeling. Most of my simulation were assuming flat fading Rayleigh channel. However, yes we can discuss.

Reply

78 jawad March 19, 2009 at 11:56 pm

hi Krishna,I get a hard time in implement the MMSE linear equalizer (non-adaptive) can you help me please..thanks.

Reply

79 Krishna Pillai March 21, 2009 at 4:48 pm

@jawad: Please refer to the post on MIMO with MMSE equalizer.
http://www.dsplog.com/2008/11/02/mimo-mmse-equalizer/

Reply

80 Rizwan March 24, 2009 at 9:38 pm

Hello ..
Well I am doing a project on ultra wideband system.I have done my simulation for AWGN channel.Now,I want to add rayleig channel to my transmiited data.Can you plz tell me the matlab code for generating rayleigh fading.
Thanks

Reply

81 Krishna Pillai March 25, 2009 at 6:00 am

@Rizwan: The Rayleigh channel modeling which I use are typically single tap (flat fading) Rayleigh channel. If you want to generate a multipath channel with each tap randomly distributed, you may use
nTap = 10;
ht = 1/sqrt(2)*1/sqrt(nTap)*(randn(1,nTap) + j*randn(1,nTap));

Reply

82 sara March 26, 2009 at 8:06 pm

hi krishna!
hope you must be fine…..
ur posts are really helpful for me
i am having a small problem
i am trying to simulate a multipath enviornment in AWGN channel by introducing delay in the signals

but at the receiver i am gettin quite high BER

can u kindly suggest me how to equalize these multipath signals at the rcvr in order to reduce BER

Reply

83 Krishna Pillai April 4, 2009 at 8:00 am

@sara: How are you equalizing for the effect of the channel. In general, if you are introducing a channel h(t) in the received signal, at the receiver you should introduce a filter g(t) in the receiver such that g(t) convolved h(t) is an impulse.

Reply

84 sara March 26, 2009 at 8:14 pm

for avgpow=0.01:0.025:1

const = pskmod([0:4-1],4)
x=randint(1,100,4); % generating symbols
tx=pskmod(x,4);

scale=modnorm(const,’peakpow’,avgpow);

%*******transmitted signal**************

mod_sig=scale*tx;

%*******SIGNAL1**************
snr1=randint(1,1,[-5,10]); % to generatge random value of snr in each iteration
y1=awgn(mod_sig,snr1);

%*******SIGNAL2**************
snr2=randint(1,1,[-5,10]);
y2=.34*awgn(mod_sig,snr2);
hd = dfilt.delay(2); % add a delay of 2 samples in its input
y2 = filter(hd,y2);

%*******SIGNAL3**************
snr3=randint(1,1,[-5,10]);
y3=0.127*awgn(mod_sig,snr3);
hd = dfilt.delay(4);
y3 = filter(hd,y3);

final_sig=y1+y2+y3;
y_rcvd=final_sig/scale;%unscale recieved signal

rcv_data=pskdemod(y_rcvd,4);

[err ,ber] = biterr(rcv_data,x)

result(k,1)=avgpow;
result(k,2)=ber;
k=k+1;
end

plot(result(:,1),result(:,2),’g')

this is my code in which i want to use equaliztion at the receiver , i have tried a few inbuilt equalizers but the worsen the results

Reply

85 Krishna Pillai April 4, 2009 at 8:05 am

@sara: Sorry, due to time constraints, may I decline to debug the code. Further, I do not have most of the functions which you have used here (i use Octave for my simulations – do not have matlab).

From a quick googling, I found the example from Mathworks
Adaptive Equalizer Simulation (Part I) This script simulates a communication link with PSK modulation, raised-cosine pulse shaping, multipath fading, and adaptive equalization.
http://www.mathworks.de/products/featured/embeddedmatlab/demos.html?file=/products/demos/shipping/comm/adapteqpt1.html

Hope this helps.

Reply

86 jenifer April 8, 2009 at 1:51 pm

chào ngài,tôi đang làm mô phỏng OFDM,điều chế QAM trong multipath(rayliegh), làm thế để tái tạo lại được chòm sao QAM?

Reply

87 Krishna Pillai April 11, 2009 at 7:03 am

@jenifer: Can you please translate your query to english.

Reply

88 sara April 12, 2009 at 10:55 pm

thanx alot krishna….
ur efforts are really helpful…
can u plz tell me how the behaviour of real single tap rayleigh chaneel differs from complex single tap raleigh channel.???

regards
sara

Reply

89 Krishna Pillai April 16, 2009 at 5:38 am

@sara: In the case of a real channel, only the amplitude is affected. With a complex channel, both amplitude and phase are affected, agree?

Reply

90 lee_john April 16, 2009 at 1:45 pm

hi krishna!
greetings,
all these statements presented above is extreamly helpful to me, and i resently am trying to simulate a paper in which it needs to entry the circularly symmetric gaussian r.v.,could u help me to code the program?
thanx in advance!

Reply

91 Krishna Pillai April 18, 2009 at 7:55 am

@ lee_john: A circulary symmetric gaussian random variable has real and imaginary components having independent Gaussian distributions.

N = 10^4;
rv = randn(1,N) + j*randn(1,N);

Hope this helps.

Reply

92 Mustafa May 13, 2009 at 8:30 pm

Hi Krisha,
Hope you are doing well. Can you please mail me the link for performance analysis of MIMO in Rician Fading channel. Thanks.

Reply

93 Krishna Pillai May 20, 2009 at 5:10 am

@Mustafa: Sorry, I have not tried modeling Rician fading channel

Reply

94 sara May 14, 2009 at 10:31 pm

@ krishna
thanx for ur reply
yea i agree….
but tell me do we have to u phase lock loop or any other phase detection loop in case of complex rayleigh channel or an lms equalizer would server the purpose????

regards
sara

Reply

95 Krishna Pillai May 20, 2009 at 5:14 am

@sara: Well, the assumption in the above post is that there is no frequency offset and the only distortion is the effect of the channel. If there is frequency offset, we need to have mechanism for removing it (like PLL) prior to equalization

Reply

96 kangkan paul May 27, 2009 at 10:23 am

nice work…
plz include flat fading modeling and Fading Effects due to Doppler Spread…and other statistical models as clarke’s Model etc and techniques to combat this.

Reply

97 Krishna Pillai May 31, 2009 at 8:31 pm

@kangkan: Sure, adding posts on Doppler channel is in my mind for some time. Need to do it… .:)

Reply

98 Charly June 19, 2009 at 6:15 pm

Hi Krishna,

Maybe the comment is a little bit off-topic but I’m quite desperate.

I’m writing a thesis to provide with some MIMO capabilities the network simulator OpenWNS.

I program a non-gemoetrical matrix channel generator (also knowed as H). To generate this matrix we only need two parameters, number on antenas (Tx and Rx) and correlation factor. Several papers talk about that the MIMO gain deppends on the correlation factor of the channel matrix.

The generator works quite good giving matrix with correlations between 0 and 0.6.

Then we transform the SISO stream in MIMO Stream with the next formula:

SINRk=(SINRsiso/#antennas)*(1/diagonal of the inverse of (H^H*H))

This formula provide us K post-processing SINR. But when I calculate the gain with the different correalations is always more or less the same, and I don’t know where is the fail/problem.

Sorry if it’s disturbs you, but I don’t know what else can I do.

Thank you in advance.

Charly

Reply

99 Charly June 21, 2009 at 12:39 am

After several analisis the problem should be in the channel matrix generator.

The function to generate the the desired correlated channel is the next one:

function result = Rayleigh_Ch(Corr_param,N, n_samples)
%Corr_param=Correlation parameter desired between 0 and 1
%N=Number of correlated variables (ex: in a 4×4 channel matrix
%N=4×4=16)

n_t=sqrt(N);
n_r=sqrt(N);
Wrayl=zeros(n_t,n_r,n_samples);
RaylValue=zeros(n_t,n_r);
rayl_param=sqrt(2/pi);

%Matrix Initialization
V_Complex=zeros(N,n_samples);
W=zeros(N,n_samples);
%%%%
%% STEP 1: NORMALIZE THIS MATRIX TO CREATE THE NORMALIZED COVARIANCE MATRIX
%% OF RAYLEIGH SAMPLES
%%%%
Kg=Corr_param*ones(N,N);
for pos_diag=1:1:N
Kr(pos_diag,pos_diag)=1;
end

%%%%
%% STEP 2: GENERATE N UNCORRELATED COMPLEX GAUSSIAN SAMPLES IN VECTOR V,
%% THEN DETERMINE THE COLORING MATRIX L AND GENERATE THE COMPLEX GAUSSIAN
%% SAMPLES USIN W=L*V
%%%%

%obtaining the coloring matrix
[L,P,U]=lu(Kg);

%GENERATE N UNCORRELATED COMPLEX GAUSSIAN SAMPLES IN VECTOR V

for sample=1:1:n_samples
%generate correlated complex Gaussian samples using W=L*V
V_Complex(:,sample)=sqrt(0.5)*randn(N,1)+1i*sqrt(0.5)*randn(N,1);
W(:,sample)=L*V_Complex(:,sample);
end
Wgauss=reshape(W,1,N*n_samples);

%%%%
%% STEP 3: Create the desired Rayleigh envelopes
%%%%
Wrayl=abs(real(Wgauss))+1j*(imag(Wgauss));
Wrayl=reshape(Wrayl,4,4,n_samples); %every sample is a rayleigh fadding channel matrix

result=Wrayl;
end %end of the function

I obtain the Rayleigh distribution from the gaussian one, making the real part absolute and then accopling the imaginary part.

Hope it will help.

Reply

100 Krishna Pillai June 21, 2009 at 12:57 pm

@Charly: I guess, you are expecting to see that post processing SNR will be low when the correlation is high, but not able to see that. To debug, may I suggest that you try computing with two channel matrices of 2×2 dimenstion
(a) [1 1; 1 -1] : orthogonal channel,
(b) [1 1 ; 1 1] : channel with rank of 1,

Reply

101 Charly June 21, 2009 at 10:34 pm

Yes, that is the point. I don’t know what is missing in the channel matrix deffinition.

I will try to change the code to work with 2 antennas at the receiver and transmissor side (matrices of 2×2).

Any suggestion for the correlated channel generation?

Thank you for your fast reply.

Charly

Reply

102 Krishna Pillai June 22, 2009 at 5:46 am

@Charly: Sorry, I have not tried modeling correlated channel. Good luck in your explorations.

Reply

103 Charly June 22, 2009 at 8:45 pm

Than you anyway for your attention.

104 hugh June 20, 2009 at 11:25 pm

Hi Krishna,
you are good at the channel to BER. Can I ask if add two AWGN channels togeter in the FSK? it is significate to analysis the signal performance. if so, what results will come out?
thank you!

Reply

105 Krishna Pillai June 21, 2009 at 12:59 pm

@hugh: Did not quite follow your question. Did you mean, you want to double the noise power? If so, the BER will degrade by around 3dB

Reply

106 hugh June 23, 2009 at 3:38 am

Hi Krishna,
That BER in AWGN is really nice! i really like it. Do you have Matlab script for computing Bit Error Rate with Binary FSK in Rayleigh channel? I need to write the code for my project. Can you make to send me?
thank you alots!

Reply

107 Krishna Pillai June 23, 2009 at 4:42 am

@hugh: Sorry, I do not have code for Binary FSK in Rayleigh channel. However, you may look up the post on BER for binary FSK in AWGN channel as a reference.
http://www.dsplog.com/2007/08/30/bit-error-rate-for-frequency-shift-keying-with-coherent-demodulation/

Reply

108 Adnan Khan July 16, 2009 at 6:47 pm

Hello Dear Krishna, I am designing a sphere decoder for MU-MIMO. I have coded one MIMO sphere decoder but I got difficuilty in calculatin the BER for the sphere decoder in Rayleigh fading channel, can you please help me in this matter plz. Thanks

Reply

109 Krishna Pillai July 17, 2009 at 5:24 am

@Adnan: I have not tried modeling sphere decoding, but I would guess one would want to get the performance close to Maximum likelihood. Are you observing 0% BER with no-noise case?

Reply

110 Ali Habeeb Ahmad July 26, 2009 at 6:19 am

Dear Krishna,

Can you give me any guidance with using MRC for a case for once receiver and multiple transmitters…. I am using the model where the received signal after the combiner is :

Ym = conj(h1)* y1 + conj(h2)*y2 ……

But the performance for this diversity channel comes to be worse than one without diversity, I hope you shed some light on this, or advise an algorithm in line with your Simulations with flat fading channels.

Reply

111 Krishna Pillai July 28, 2009 at 4:35 am

@Ali Habeeb Ahmad: When you have multiple transmit antennas, one might want to do pre-processing at the transmitter to ensure that the signals combine coherently in the receiver. I have written a brief post on Transmit beamforming @
http://www.dsplog.com/2009/04/13/transmit-beamforming/
Hope this helps.

Reply

112 kalidoss August 10, 2009 at 2:07 pm

I can’t understand the sentence: relative small motions in the medium can cause change of 2 pi radians. Since the distance between the devices are much larger than the wavelength of the carrier frequency, it is reasonable to assume that the phase is uniformly distributed between 0 and radians and the phases of each path are independent……..

ellaborate and explain the defintion of Rayleigh fading channel………

Reply

113 Krishna Sankar August 11, 2009 at 5:11 am

@kalidoss: I was trying to mention that phase of Rayleigh faidng channel can vary anywhere from 0 to 2pi radians uniformly.

Reply

114 Mak_m August 22, 2009 at 4:29 am

hi krishna m working on mimo ofdm so far i have worked on ofdm with 2/3 convo rate coding with qpsk….but when i pas it through rayleigh channel the result is 0.5 ber..i applied mlse equalizer it does work fine QPSK (with no ofdm) . but with ofdm same thing gets 0.5 BER..plz telme where m wrong…
my rayleigh channel is
chcoeffs = [.986 .845 .237 .12345+.31i]; % Channel coefficients
filtmsg = filter(chcoeffs,1,msg); % Introduce channel distortion.
tblen = 10; % Traceback depth for equalizer
chanest = chcoeffs; % Assume the channel is known exactly.
msgEq = mlseeq(filtmsg,chanest,const,tblen,’rst’) % Equalize
then demodulation n then viterbi decoding

Reply

115 Krishna Sankar August 24, 2009 at 4:46 am

@Mak_m: Is it working with OFDM, but without channel? Further, I do not see the code, for taking the fft at the receiver.

Reply

116 Mak_m August 22, 2009 at 4:30 am

can u plz tel me where m wrong
thanks in advance

Reply

117 hassan August 24, 2009 at 7:55 pm

hye krishna

i need to ask that how can i pass my signal through a rayleigh channel, i am comparing the ofdm QAM signal performance by passing it through awgn, rayleigh and racian channel.
can you help me with that. i have an ofdm i simple pass it through awgn channel and analyzed it by its command in matlab.
now i need to pass that signal with the rayleigh and racian channel as well to visualize.
plz help me with that.

Reply

118 Krishna Sankar August 30, 2009 at 1:18 pm

@hassan: The post on BER for BPSK in OFDM modulation with Rayleigh multipath channel might be of help
http://www.dsplog.com/2008/08/26/ofdm-rayleigh-channel-ber-bpsk/

Reply

119 gulmira October 19, 2009 at 9:21 am

Hello,
thank you for sharing your knowledge. I have one question. How about in case of using Nakagami environment for QPSK modulation . how to implement simulation ?
thanks
with BR

Reply

120 Krishna Sankar October 27, 2009 at 5:11 am

@gulmira: Sorry, I have not tried modeling Nakagami channel.

Reply

121 waleed salos December 7, 2009 at 5:11 pm

Hi Krishna Pillai
Iam Waleed from Palestinian
I was in need the LMS bemforimg for pre-FFT and Post-FFT processing OFDM communiation system
Thank for all

Reply

122 Krishna Sankar December 8, 2009 at 5:28 am

@waleed salos: Sorry, I have not discussed LMS beamforming.

Reply

123 Dahiru sani Shuaibu December 8, 2009 at 9:52 am

Hello Krishna Pillai I am student doing my thesis I have one problem it looks like you have discuss about it. but I am not clear . the problem is about computing SNR value base on distance using Erceg model for pathloss can it be SNR=Pt+Gt+Gr-PL-Rs where Pt is transmitted power, Gt is the antenna gain Gr is the receiving antenna gain PL is the pathloss and Rs is the receiver sensitivity (which comprises of themal noise, noise figure etc) ?
thanks in advance

Reply

124 Krishna Sankar December 10, 2009 at 5:49 am

@Dahiru: Yes, the equation is correct.

Reply

125 makbar January 8, 2010 at 12:12 am

I wanted to know regarding how can i model a GMSK modulation over two path rayleigh channel, in matlab using rayleighchan command, and also reg BER calculation & plot.I am new to matlab and i am unable to demodulate my signal after passing it through rayleigh channel.

Reply

126 A Mehboob January 8, 2010 at 9:33 pm

Dear Krishna
In your post you said theta(n)=2*pi*fc*Tao(n) is the phase of the nth path; what does it mean? is it the phase delay introduced by nth path? If so then how can we say that? I mean we know the overall delay introduced by all paths is basically the phase response but how can we say it to individual path?

Thanks
Anser

Reply

127 Pon Chitra January 23, 2010 at 5:20 pm

Krishnan Sir,
can u tell me how to do channel estimation for OFDM System with pilot symbol intoduced . The pilots are introduced in block type. The channel estimation has to be done by LS method.

Reply

128 Ghani January 25, 2010 at 1:04 am

Hello krishnan sir

Could you kindly send me some code where there are multiple users and each is assigned a signature waveform(DS-CDMA). I need this is study the BER of such system.

Awaiting ur reply.
Thanks in advance

Reply

129 Jun February 2, 2010 at 1:30 am

Dear Krishna,
when i am doing the simulation of the rayleigh channel.I choose the formula r(t)=sum[ an(t)*x(t-tau(t))].
My question is how can i generate the attenuation an(t)?

Best regards,

Reply

130 Krishna Pillai February 24, 2009 at 5:35 am

@thiruppathi: Yes, you can. :)

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Comparing BPSK, QPSK, 4PAM, 16QAM, 16PSK, 64QAM and 32PSK

Next post: Deriving PDF of Rayleigh random variable