Sign in

username or email:

password:



Not a member?
Forgot your password?

Search compdsp



Search tips

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGA

Discussion Groups | Comp.DSP | Help on PSK signal over rayleigh fading channel

There are 3 messages in this thread.

You are currently looking at messages 1 to .


Is this discussion worth a thumbs up?

0

Help on PSK signal over rayleigh fading channel - ibto75 - 2012-08-27 06:00:00

Hi all,
Please I humbly need your help concerning the MATLAB code I am modifying to
run the performance of PSK signal over Rayleigh fading channel. The code is
not working but just giving a straight line. Any help to sort this my
problem will be greatly appreciated.

   


% Create Rayleigh fading channel object.
chan = rayleighchan(1/10000,100);

% Generate data and apply fading channel.
M = 2;                              % PSK modulation order
hMod = modem.pskmod('M', M);        % Create a PSK modulator
hDemod = modem.pskdemod(hMod);      % Create a PSK demodulator
                                        % using the modulator
sigLen = 50000;
tx = randi([0 M-1],sigLen,1);       % Generate a random bit stream
pskSig = modulate(hMod, tx);        % PSK modulate the signal
fadedSig = filter(chan,pskSig);     % Apply the channel effects



SNR = 0:2:20;                       % Range of SNR values, in dB
numSNR = length(SNR);
BER = zeros(1, numSNR);
for n = 1:numSNR
   rxSig = awgn(fadedSig,SNR(n));   % Add Gaussian noise
   rx = demodulate(hDemod, rxSig);  % Demodulate
   % reset(hDemod);
   [nErrors, BER(n)] = biterr(tx,rx); % Compute error rate
end

% Compute theoretical performance results, for comparison
BERtheory = berfading(SNR,'psk',M,1);
BERawgn = berawgn(SNR, 'psk', M, 'nondiff') ;    

% Plot BER results
figure
semilogy(SNR, BERawgn,'c.:',SNR, BERtheory,'b-',SNR,BER,'r*');
legend('AWGN fading', 'Theoretical BER','Empirical BER');
xlabel('SNR (dB)'); ylabel('BER');
axis([0 20  10e-6  1])
title('Binary PSK over Rayleigh Fading Channel');



Thank you.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Help on PSK signal over rayleigh fading channel - David Drumm - 2012-08-27 12:23:00



It looks like your sampling rate on the rayleighchan is 1/10000, but the
sampling rate of pskSig is 1. 
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Help on PSK signal over rayleigh fading channel - David Drumm - 2012-08-27 12:44:00

You might also want to try: 

rxSig = awgn(fadedSig,SNR(n),'measured');

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.