Clear Filters
Clear Filters

BCH DVB-S2 codes for short code length LDPC

23 views (last 30 days)
i am trying to create a BCH encoder for a DVB-S2 code based on Final draft ETSI EN 302 307 V1.2.1 (2009-04) table 5b (16200 ldpc code legnth). So i have used the following parmaters to generate the generator polynomials (g)
R = 8/9, Kbch = 14232, Nbch = 14400, t = 12, nldpc = 16200
R = 0.8889
Kbch = 14232
Nbch = 14400
t = 12
nldpc = 16200
g = x^12 + x^10 + x^9 + x^7 + x^6 + x^5 + x^3 + x^2 + x + 1
Accoridng to MATLAB, i can use this in comm.BCHEncode/comm.BCHDecode.
bchEnc = comm.BCHEncoder(Nbch,Kbch,'x^12 + x^10 + x^9 + x^7 + x^6 + x^5 + x^3 + x^2 + x + 1');
msg = randi([0 1],Kbch,1);
EncodedData = bchEnc(msg)
Error using comm.BCHEncoder/setParameters
The generator polynomial must evenly divide X^n+1, where n is the length of a full length code
However when i try this i get this error:
Error using comm.BCHEncoder/setParameters The generator polynomial must evenly divide X^n+1
So either i am using the wrong BCH encoder or ive got the polynomials wrong.

Accepted Answer

Sathvik
Sathvik on 2 May 2023
Hi George
By setting a generator polynomial, you are shortening the BCH code to a message length of 5 (since the default ShortMessageLength property is set to 5), which may not be ideal for your parameters. I would suggest you to set the Parameters as follows.
enc = comm.BCHEncoder(Nbch,Kbch);
This way, the generator polynomial would be created automatically
Here is an example code to verify the BCH Encoder
Kbch = 14232;
Nbch = 14400;
% Encoding
msg = randi([0 1], Kbch, 1);
enc = comm.BCHEncoder(Nbch,Kbch);
y=enc(msg);
% Decoding
dec = comm.BCHDecoder(Nbch,Kbch);
z=dec(y);
isequal(msg,z)
ans = logical
1
You can refer to the following documentation for more information on how you can implement your BCH code
Hope this helps!

More Answers (0)

Community Treasure Hunt

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

Start Hunting!