Ethem
Posts:
9
Registered:
1/26/09
|
|
Re: commBCHEncoder/commBCHDecoder
Posted:
Dec 20, 2010 11:07 AM
|
|
Hi Spiros, You also need to set the appropriate primitive polynomial. Please have a look at the function called "getParamsDVBS2Demo" that comes with the DVBS2 demo. The demo uses the G^16 minimum weight primitive polynomial (e.g. primpoly(16,'min')). Hth, Ethem
"Spiros " <spzettas@gmail.com> wrote in message <ieikf0$s16$1@fred.mathworks.com>... > 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
|
|