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:
QPSK BER modulation

Subject: QPSK BER modulation

From: tina

Date: 17 Jan, 2011 21:38:04

Message: 1 of 2

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

Subject: QPSK BER modulation

From: Shivani

Date: 17 Apr, 2011 03:29:05

Message: 2 of 2

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

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