estimate BER for LDPC 1/2 code

10 vues (au cours des 30 derniers jours)
pertesis aris
pertesis aris le 7 Mar 2020
Commenté : pertesis aris le 29 Mar 2020
I try to find the ber for LDPC code but I the result it seems wrong. pls help!!
EbNoVec = (-1:0.5:11 )'; % Eb/No values (dB)
berEst = zeros(size(EbNoVec));
bpskModulator = comm.BPSKModulator;
bpskDEModulator = comm.BPSKDemodulator;
p = dvbs2ldpc(1/2);
ldpcEncoder = comm.LDPCEncoder(p);
ldpcDecoder = comm.LDPCDecoder(p);
msg = logical(randi([0 1],size(p,2)-size(p,1),1));
for n = 1:length(EbNoVec)
% Reset the error and bit counters
numErrs = 0;
numBits = 0;
while numErrs < 1000 && numBits < 1e6
% Transmit and receive LDPC coded signal data
encData = ldpcEncoder(msg);
%channel
dataMod_psk = bpskModulator(encData);
% Pass through AWGN channel
channel = comm.AWGNChannel('EbNo',EbNoVec(n),'BitsPerSymbol',1);
dataMod_psk2=channel(dataMod_psk);
dataDeMod_psk3=bpskDEModulator(dataMod_psk2);
rxBits = ldpcDecoder(dataDeMod_psk3);
MSG=rxBits;
chk = isequal(msg,MSG);
% Calculate the number of bit errors
nErrors = biterr(msg,MSG);
% Increment the error and bit counters
numErrs = numErrs + nErrors;
numBits = numBits + length(msg);
end
% Estimate the BER
berEst(n) = numErrs/numBits;
end
berTheory = berawgn(EbNoVec,'psk',2,'nondiff');
semilogy(EbNoVec,berEst,'-.')
grid
legend('Estimated BER ldpc')
xlabel('Eb/No (dB)')
ylabel('Bit Error Rate')

Réponse acceptée

Sriram Tadavarty
Sriram Tadavarty le 19 Mar 2020
Modifié(e) : Sriram Tadavarty le 19 Mar 2020
Hi Pertesis,
The issue you observe is due to the usage of comm.BPSKDemodulator with hard decision (which is the default) in conjunction with the LDPC decoder. Note that LDPC decoder expects the input to be the LLR's, but due to the hard decision from the BPSK demodulation, the output is bits from it. This is provided to LDPC decoder and it just wasn't able to decode any of it properly. I suggest you to make the following update to the BPSK demodulator and place the EbNoVec range from -11:0.1:2 to see the free falling curve.
bpskDEModulator = comm.BPSKDemodulator('DecisionMethod',"Log-likelihood ratio");
More details of the usage of LDPC decoder and BPSK demod can be accessed with the links.
Hope this helps.
Regards,
Sriram
  1 commentaire
pertesis aris
pertesis aris le 29 Mar 2020
ok thnx for the help. I would like to ask who can I use comm.LDPCEncoder for 16384 bits length?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur PHY Components dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by