No BSD License  

Highlights from
QPSK Simulation

1.0

1.0 | 1 rating Rate this file 18 Downloads (last 30 days) File Size: 1.1 KB File ID: #15111

QPSK Simulation

by M G

 

24 May 2007 (Updated 24 May 2007)

qpsk simulation in matlab

| Watch this File

File Information
Description

simulates a baseband qpsk system

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
28 May 2007 Richard Brown

Reasons for giving a '1':
* Script with malicious clear all, close all
* Undocumented
* Even the graph it plots is unlabelled
* Requires communications toolbox (e.g. randsrc), and this is not stated

This is clearly a homework problem, and of no use to anyone else. As its only value would be instructional, it should be very clearly documented. Suggest significant rewrite or removal

28 May 2007 Duane Hanselman

No need to download, here is the M-file contents:

N = 1000;
iter = 100;
expSymErrs = 10;
EbNo = 0:1:10;
bitsnrdB = EbNo;
bitsnrlin = 10.^(bitsnrdB/10);
theo_berr = 0.5*erfc(sqrt(bitsnrlin));
theo_serr = 1 - (1 - theo_berr).^2;
semilogy(bitsnrdB,theo_berr,'m', bitsnrdB,theo_serr,'g');
axis([0 max(EbNo) 1e-6 1]);
grid on
hold on
drawnow
for t = 1:length(EbNo)
    idx = 1;
    errSym = 0;
    while ((idx <= iter) || (sum(errSym) <= expSymErrs))
        s = 1/sqrt(2)*(randsrc(N,1) + j*randsrc(N,1));
        % Compute EsNo
        EsNo = EbNo(t) + 10*log10(2);
        EsNolin = 10.^(EsNo/10);
        No = 1/EsNolin; % Assuming Es = 1
        var = No; %
        n = sqrt(var/2)*(randn(N,1) + j*randn(N,1));
        x = s + n;
        % Detection follows
        alph = [1+j, 1-j, -1+j, -1-j]/sqrt(2);
        detx = zeros(N,1);
        for tt = 1:N
            [val,id] = min(abs(x(tt) - alph));
            detx(tt) = alph(id);
        end
        errSym(idx) = length(find(s ~= detx));
        idx = idx + 1;
    end
    pe(t) = mean(errSym)/N;
    semilogy(EbNo(t),pe(t),'-ob')
    drawnow
end

07 Aug 2009 Mak

i have been working on viterbisim.m which is a built-in matlab example for understanding the ber tool.. i that i have tried to change the code rate to 2/3 with trellis structure of
t = poly2trellis([5 4],[23 35 0; 0 5 13]); but output ber graph is completely unexpected n highly fluctuated.. i m not working on simulink ..plz help me how can i resolve this issue ..
basically my project is on mimo-ofdm so far i have done ofdm transceiver which works ok without rayleigh which is like this
data source ->FEC(2/3)->qpsk->ofdm ......but i need to send bits in a loop for more accurate ber that is i dont have to guess in advance ! thats y i m working on viterbisim.m... plz help m i have hardly got 2months to submit it ...
thanks in advance

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
qpsk simulation M G 22 Oct 2008 09:13:45
baseband M G 22 Oct 2008 09:13:45
communications M G 22 Oct 2008 09:13:45
matlab M G 22 Oct 2008 09:13:45
qpsk simulation Ekstension UI 20 Apr 2009 19:25:50
qpsk simulation Adnan 19 Oct 2011 01:54:33

Contact us at files@mathworks.com