LTE Turbo encoder with R = 1/2 - BER performance with LTE Toolbox
6 次查看(过去 30 天)
显示 更早的评论
Hi there,
I am trying to make BER performance of LTE Turbo encoding with rate matching R = 1/2. But, when I implement symbol modulation and demodulation I can't get BER = 0 (without any AWGN existence). This indicates that problem is in mod/demod part. I will be also great to use BPSK instead of QPSK but lteSymbolModulate doesn't have this modulation scheme. Thank You in advance.
All best,
Mirza
clear;
K = 128;
E = 2*K;
mbits = randi([0,1],K, 1);
crc = lteCRCEncode(mbits,'24A');
cbs = lteCodeBlockSegment(crc); % This will provide a length 4096 bits that is input to the Turbo encoder
cd = lteTurboEncode(cbs);
cdrm = lteRateMatchTurbo(cd, E, 0);
%cdrm(cdrm == 0) = -1; % Make them as LLRs
txSymbols = lteSymbolModulate(cdrm,'QPSK');
awgnchan = comm.AWGNChannel('NoiseMethod','Variance','Variance',3);
rxSymbols = txSymbols;% awgnchan(txSymbols);
softBits= lteSymbolDemodulate(rxSymbols,'QPSK','Soft');
cdrx = lteRateRecoverTurbo(softBits, K, 0);
%
mhat = lteTurboDecode(cdrx); % So after the Turbo decoding, it will have 4096 bits rather than 4032 bits, due to addition of filler bits and CRC
cbshat = lteCodeBlockDesegment(mhat, K+24);
crchat = lteCRCDecode(cbshat,'24A'); % This will return the same as message length
% Check the decoded bits with message bits
[~,BER] = biterr( double(crchat),mbits);
BER
1 个评论
Shashi Kiran
2024-7-26
I have reviewed and executed the provided code in MATLAB R2023b. The results showed a Bit Error Rate (BER) within the range of when AWGN noise with a variance of 3 was applied, and zero BER when no AWGN noise was used. You can find the implementation below.
clear;
K = 128;
E = 2*K;
mbits = randi([0,1],K, 1);
crc = lteCRCEncode(mbits,'24A');
cbs = lteCodeBlockSegment(crc); % This will provide a length 4096 bits that is input to the Turbo encoder
cd = lteTurboEncode(cbs);
cdrm = lteRateMatchTurbo(cd, E, 0);
%cdrm(cdrm == 0) = -1; % Make them as LLRs
txSymbols = lteSymbolModulate(cdrm,'QPSK');
awgnchan = comm.AWGNChannel('NoiseMethod','Variance','Variance',3);
rxSymbols = txSymbols;% awgnchan(txSymbols);
softBits= lteSymbolDemodulate(rxSymbols,'QPSK','Soft');
cdrx = lteRateRecoverTurbo(softBits, K, 0);
%
mhat = lteTurboDecode(cdrx); % So after the Turbo decoding, it will have 4096 bits rather than 4032 bits, due to addition of filler bits and CRC
cbshat = lteCodeBlockDesegment(mhat, K+24);
crchat = lteCRCDecode(cbshat,'24A'); % This will return the same as message length
% Check the decoded bits with message bits
[~,BER] = biterr( double(crchat),mbits);
fprintf("Bit Error Rate without AWGN noise: %d ",BER)
Additionally, I found that the lteSymbolModulate function supports BPSK modulation.
txSymbols = lteSymbolModulate(cdrm,'BPSK'); % For Modulation
softBits = lteSymbolDemodulate(rxSymbols,'BPSK','Soft'); % For Demodulation
Here is the relevant documentation:
If there are any other requirements or modifications needed, let me know.
回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!