estimate BER for LDPC 1/2 code

11 ビュー (過去 30 日間)
pertesis aris
pertesis aris 2020 年 3 月 7 日
コメント済み: pertesis aris 2020 年 3 月 29 日
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')

採用された回答

Sriram Tadavarty
Sriram Tadavarty 2020 年 3 月 19 日
編集済み: Sriram Tadavarty 2020 年 3 月 19 日
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 件のコメント
pertesis aris
pertesis aris 2020 年 3 月 29 日
ok thnx for the help. I would like to ask who can I use comm.LDPCEncoder for 16384 bits length?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePHY Components についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by