Spiros
Posts:
4
Registered:
12/18/10
|
|
commBCHEncoder/commBCHDecoder
Posted:
Dec 18, 2010 10:37 AM
|
|
Hi to all, This question is considered with the use of Communications Toolbox/Blockset.
I am trying to write a m-file that uses the comm.BCHEncoder/comm.Decoder in MATLAB R2010b for the DVB-T2 (DVB-S2 are the same) standard?.
In the DVB-S.2 model in Simulink the compiler doesn't complaint for any LDPC rate and everything seems OK. In my code,if I try to use comm.BCHEncoder with any code rate other than 1/2 again everything is OK. When I try Kbch=32208 and Nbch=32400, I get an error:The values for N and K do not produce a valid narrow-sense BCH code.
%-----------------BCH encoding.... -------------------------------------- % % Constrution of BCH_Encoder and BCH_Decoder N_BCH=32400; K_BCH=32208; BBFrame=round(rand(32208,1)); BCH_Encoder=comm.BCHEncoder('CodewordLength',N_BCH,'MessageLength',K_BCH,'GeneratorPolynomial',g); BCH_Decoder=comm.BCHDecoder('CodewordLength',N_BCH,'MessageLength',K_BCH,'GeneratorPolynomial',g);
BCHFrame=step(BCH_Encoder Where BBframe is a random 32400 binary vector, and g the generator polynomial exactly the same as in the Simulink model DVB.S2 (can be found under "dvb stuct". P.S. I also tried to use the PrimitivePolynomial with no success.
Hope for help kindly regards Spiros
|
|