QPSK BER modulation

  • Follow


I wrote a mfile that it simulates the qpsk modulation in an AWGN channel, but after 6dB SNR its probability of error is equal to "0",  I used matlab functions like, awgn, pskmode, pskdemode and so on and the syntax that I found in matlab Help. What is the solution?
 this is my mfile:

% In The Name of GOD


clear

% Create QPSK modem
M = 4;
hMod = modem.pskmod(M);
hDemod = modem.pskdemod(hMod);

% Generate data stream
tx = randint(10000,1,M);

% Modulate the data
txSig = modulate(hMod, tx);

% Compute error rate for different values of SNR.
EbNo = (0:13);
k = log2(M);
SNR = EbNo+10*log10(k); % Range of SNR values, in dB(Because No = 2*noiseVariance^2, we must add 3 dB)
BER = zeros(length(SNR), 1);
rx = zeros(length(tx),1);
for n = 1:length(SNR)
   rxSig = awgn(txSig,SNR(n),'measured'); % Add Gaussian noise.
   rx = demodulate(hDemod, rxSig); % Demodulate.
  
   % Compute error rate.
   [nErrors, BER(n,1)] = biterr(tx,rx);
end

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

semilogy(EbNo,BERtheory,'b-',EbNo,BER,'r*',EbNo,BER,'r');grid on;hold on;
legend('Theoretical BER','Empirical BER');
xlabel('EbNo (dB)'); ylabel('BER');
title('QPSK Modulation in an AWGN channel');
0
Reply tina 1/17/2011 9:38:04 PM

Hi, I want to know how you have taken the EbNo values from 0 to 13? I mean what is the criteria of choosing the range? I am building an OFDM based transmitter and I have to put the values of EbNo for 16 QAM an 64 QAM.So, for that, I wanted to know about it. "tina " <mehrabi_bayan@yahoo.com> wrote in message <ih2crs$kos$1@fred.mathworks.com>...
> I wrote a mfile that it simulates the qpsk modulation in an AWGN channel, but after 6dB SNR its probability of error is equal to "0",  I used matlab functions like, awgn, pskmode, pskdemode and so on and the syntax that I found in matlab Help. What is the solution?
>  this is my mfile:
> 
> % In The Name of GOD
> 
> 
> clear
> 
> % Create QPSK modem
> M = 4;
> hMod = modem.pskmod(M);
> hDemod = modem.pskdemod(hMod);
> 
> % Generate data stream
> tx = randint(10000,1,M);
> 
> % Modulate the data
> txSig = modulate(hMod, tx);
> 
> % Compute error rate for different values of SNR.
> EbNo = (0:13);
> k = log2(M);
> SNR = EbNo+10*log10(k); % Range of SNR values, in dB(Because No = 2*noiseVariance^2, we must add 3 dB)
> BER = zeros(length(SNR), 1);
> rx = zeros(length(tx),1);
> for n = 1:length(SNR)
>    rxSig = awgn(txSig,SNR(n),'measured'); % Add Gaussian noise.
>    rx = demodulate(hDemod, rxSig); % Demodulate.
>   
>    % Compute error rate.
>    [nErrors, BER(n,1)] = biterr(tx,rx);
> end
> 
> % Compute theoretical performance results, for comparison.
> BERtheory = berawgn(SNR,'psk',M,'nondiff');
> 
> semilogy(EbNo,BERtheory,'b-',EbNo,BER,'r*',EbNo,BER,'r');grid on;hold on;
> legend('Theoretical BER','Empirical BER');
> xlabel('EbNo (dB)'); ylabel('BER');
> title('QPSK Modulation in an AWGN channel');
0
Reply shins87 (1) 4/17/2011 3:29:05 AM


1 Replies
740 Views

(page loaded in 0.045 seconds)

Similiar Articles:













7/21/2012 8:20:11 PM


Reply: