Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
What's problem with "Rayleighchan" ?

Subject: What's problem with "Rayleighchan" ?

From: hoang tuan

Date: 2 Jan, 2010 17:26:04

Message: 1 of 4

Hello everybody !
I want to simmulate a Rayleigh channel with BPSK signal with following code
===============================
chan=rayleighchan(1/10000,100);
M=2;
tx=randint(nbit,1,M);
dpsksig=pskmod(tx,M);
fadedsig=filter(chan,dpsksig);
snr=0:1:20;
for n=1:length(snr)
    rxsig=awgn(fadedsig,snr(n));
    rx=pskdemod(rxsig,M);
    [nerrors,ber(n)]=biterr(tx(2:end),rx(2:end));
end
================================
 But BER [1*21] I get is terrible
[0.472647264726473 0.477147714771477 0.465246524652465 0.465346534653465 0.470547054705471 0.463746374637464 0.462746274627463 0.458845884588459 0.461246124612461 0.461546154615462 0.460046004600460 0.457145714571457 0.454145414541454 0.453945394539454 0.453345334533453 0.456245624562456 0.452745274527453 0.452245224522452 0.454945494549455 0.454645464546455 0.454845484548455]
It is different with theorical BER.
Why there is that difference? Someone can help me?
Sorry for bad English.

Subject: What's problem with "Rayleighchan" ?

From: fboucher

Date: 4 Jan, 2010 13:42:47

Message: 2 of 4

Hi Hoang,
To solve your problem you have to either compensate for the phase shift
caused by the channel before demodulating the signal (to do this you can
implement a phase estimator or you can 'cheat' and apply a phase
correction based on the true channel gains that can be stored setting the
StorePathGains property of the channel object to true) or you can use
differential modulation to cancel the phase errors caused by the channel.
Type 'help modem.dpskmod' in the command line to find out how to use the
differential PSK modulator in the Communications Toolbox.

HTH

Frantz

"hoang tuan" <tuannatsuki@yahoo.com> wrote in message
news:hhnvjc$ipj$1@fred.mathworks.com...
> Hello everybody !
> I want to simmulate a Rayleigh channel with BPSK signal with following
> code ===============================
> chan=rayleighchan(1/10000,100);
> M=2;
> tx=randint(nbit,1,M);
> dpsksig=pskmod(tx,M);
> fadedsig=filter(chan,dpsksig);
> snr=0:1:20;
> for n=1:length(snr)
> rxsig=awgn(fadedsig,snr(n));
> rx=pskdemod(rxsig,M);
> [nerrors,ber(n)]=biterr(tx(2:end),rx(2:end));
> end
> ================================
> But BER [1*21] I get is terrible [0.472647264726473 0.477147714771477
> 0.465246524652465 0.465346534653465 0.470547054705471 0.463746374637464
> 0.462746274627463 0.458845884588459 0.461246124612461 0.461546154615462
> 0.460046004600460 0.457145714571457 0.454145414541454 0.453945394539454
> 0.453345334533453 0.456245624562456 0.452745274527453 0.452245224522452
> 0.454945494549455 0.454645464546455 0.454845484548455]
> It is different with theorical BER.
> Why there is that difference? Someone can help me?
> Sorry for bad English.

Subject: What's problem with "Rayleighchan" ?

From: hoang tuan

Date: 4 Jan, 2010 15:02:05

Message: 3 of 4

"fboucher" <frantz.bouchereau@mathworks.com> wrote in message <hhsr8s$e51$1@fred.mathworks.com>...
> Hi Hoang,
> To solve your problem you have to either compensate for the phase shift
> caused by the channel before demodulating the signal (to do this you can
> implement a phase estimator or you can 'cheat' and apply a phase
> correction based on the true channel gains that can be stored setting the
> StorePathGains property of the channel object to true) or you can use
> differential modulation to cancel the phase errors caused by the channel.
> Type 'help modem.dpskmod' in the command line to find out how to use the
> differential PSK modulator in the Communications Toolbox.
>
> HTH
>
> Frantz
 Thanks for your idea. I've tried with dpsk, the result is better. I don't know the "phase estimator" or "a cheat" have any affect when we just have awgn noise, no fading. Because I want to compare BER of two case.

Subject: What's problem with "Rayleighchan" ?

From: mahmud_dbm

Date: 17 Feb, 2010 19:30:26

Message: 4 of 4

Hello Dears

You need Equalizer here, otherwise don't play with this Rayleigh channel, simply go for AWGN. mlse equaliser can help you, or pilot technique could help you..

From Matlab Point of View one thing you can do is, use PathGain property of your channel Object to find out channel status, and Equalize your noisy signal with this.

hope it Helps

Mahmud

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us