Path: news.mathworks.com!not-for-mail
From: "Shivani " <shins87@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: QPSK BER modulation
Date: Sun, 17 Apr 2011 03:29:05 +0000 (UTC)
Organization: University of Maryland, College Park
Lines: 41
Message-ID: <iodmq1$eu5$1@fred.mathworks.com>
References: <ih2crs$kos$1@fred.mathworks.com>
Reply-To: "Shivani " <shins87@gmail.com>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1303010945 15301 172.30.248.46 (17 Apr 2011 03:29:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 17 Apr 2011 03:29:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2734873
Xref: news.mathworks.com comp.soft-sys.matlab:722289

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');