Decode data using BCH decoder
The BCHDecoder
object recovers a binary message
vector from a binary BCH codeword vector. For proper decoding, the
codeword and message length values in this object must match the properties
in the corresponding comm.BCHEncoder
System
object™.
To decode a binary message from a BCH codeword:
Define and set up your BCH decoder object. See Construction.
Call step
to recover a binary message
vector from a binary BCH codeword vector according to the properties
of comm.BCHDecoder
. The behavior of step
is
specific to each object in the toolbox.
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System
object, you can
call the object with arguments, as if it were a function. For example, y
= step(obj,x)
and y = obj(x)
perform
equivalent operations.
dec = comm.BCHDecoder
creates a BCH decoder System
object, dec
,
that performs BCH decoding.
dec = comm.BCHDecoder(
creates
a BCH decoder object, N
,K
)dec
, with the CodewordLength
property
set to N
and the MessageLength
property
set to K
.
dec = comm.BCHDecoder(
creates
a BCH decoder object, N
,K
,GP
)dec
, with the CodewordLength
property
set to N
, the MessageLength
property
set to K
, and the GeneratorPolynomial
property
set to GP
.
dec = comm.BCHDecoder(
creates
a BCH decoder object, N
,K
,GP
,S
)dec
, with the CodewordLength
property
set to N
, the MessageLength
property
set to K
, the GeneratorPolynomial
property
set to GP
, and the ShortMessageLength
property
set to S
.
dec = comm.BCHDecoder(
creates
a BCH decoder object, N
,K
,GP
,S
,Name
,Value
)dec
, with the CodewordLength
property
set to N
, the MessageLength
property
set to K
, the GeneratorPolynomial
property
set to GP
, the ShortMessageLength
property
set to S
, and each specified property Name
set
to the specified Value
.
dec = comm.BCHDecoder(
creates
a BCH decoder object, Name
,Value
)dec
, with each specified
property set to the specified value. You can specify additional namevalue
pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).

Codeword length Specify the codeword length of the BCH code as a doubleprecision positive integer scalar. The
default is 

Message length Specify the message length as a doubleprecision positive integer scalar. The values of the


Short message length source Specify the source of the shortened message as
either 

Shortened message length Specify the length of the shortened message as a doubleprecision positive integer scalar
whose value must be less than or equal to 

Source of generator polynomial Specify the source of the generator polynomial as
either 

Generator polynomial Specify the generator polynomial as a binary doubleprecision row vector, a binary Galois
field row vector that represents the coefficients of the generator polynomial in order of
descending powers, or as a polynomial character
vector. The length of the generator polynomial requires a value of 

Enable generator polynomial checking Set this property to 

Source of primitive polynomial Specify the source of the primitive polynomial as 

Primitive polynomial Specify the primitive polynomial of order M, that defines the finite Galois field GF(2). Use a
doubleprecision, binary row vector with the coefficients of the polynomial in order of
descending powers or a polynomial character
vector. This property applies when you set the 

Source of puncture pattern Specify the source of the puncture pattern as 

Puncture pattern vector Specify the pattern that the object uses to puncture the encoded data. Use a doubleprecision
binary column vector of length 

Enable erasures input Set this property to 

Output number of corrected errors Set this property to 
The notation y = c * x
denotes that y
is
an integer multiple of x
.
The number of punctures equals the number of zeros in the puncture vector.
M is the degree of the primitive polynomial.
Each group of M bits represents an integer between 0
and 2^{M}–1
that
belongs to the finite Galois field GF(2^{M})
.
ShortMessageLengthSource 





Auto 



c * (CodewordLength – number of punctures) 
Property 




step  Decode data using a BCH decoder 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 
[1] Clark, George C. Jr., and J. Bibb Cain, ErrorCorrection Coding for Digital Communications. New York, Plenum Press, 1981.
[2] Wicker, Stephen B., Error Control Systems for Digital Communication and Storage Upper Saddle River, NJ, Prentice Hall, 1995.
This object implements the algorithm, inputs, and outputs described in Algorithms for BCH and RS Errorsonly Decoding.
bchdec
 bchgenpoly
 comm.BCHEncoder
 comm.RSDecoder
 primpoly