BCH Decoder

www.kxcad.net Home > CAE Software Index > MATLAB Index >


Your Ad Here

Decode BCH code to recover binary vector data

Library

Block sublibrary of Channel Coding

Description

The BCH Decoder block recovers a binary message vector from a binary BCH codeword vector. For proper decoding, the first two parameter values in this block should match the parameters in the corresponding BCH Encoder block.

This block supports punctures and erasures (Shortening, Puncturing, and Erasures provides a tutorial).

The input must be a frame-based column vector with an integer multiple of (N - the number of punctures) elements. Each group of N input elements represents one codeword to be decoded. The values of (N + shortening length) and (K + shortening length) must produce a valid narrow-sense BCH code.

If the decoder is processing multiple codewords per frame, then the same puncture pattern holds for all codewords.

For a given codeword length N, only specific message lengths K are valid for a BCH code. For a full length BCH code, N must be of the form 2M-1, where . If N is less than 2M-1, the block assumes that the code has been shortened by length 2M - 1 - N. However, if N is greater than or equal to 2M-1, Primitive polynomial must be specified to appropriately set the value of M.

No known analytic formula describes the relationship among the codeword length, message length, and error-correction capability. For a list of some valid values of K corresponding to values of N up to 511, see the bchenc reference page in the Communications Toolbox documentation.

The primitive and generator polynomials may be specified in their respective fields, which appear after selecting their corresponding check boxes.

To have the block output error information, select Output number of corrected errors. Selecting this option causes a second output port to appear. The second output is the number of errors detected during decoding of the codeword. A negative integer indicates that the block detected more errors than it could correct using the coding scheme.

The sample times of all input and output signals are equal.

This block supports double and boolean data types.

Dialog Box

Codeword length, N

The codeword length.

Message length, K

The message length.

Specify primitive polynomial

Selecting this check box enables the field Primitive polynomial.

Primitive polynomial

This field is available only when Specify primitive polynomial is selected.

A row vector that represents the binary coefficients of the primitive polynomial in order of descending powers.

The default value is de2bi(primpoly(4, 'nodisplay'), 'left-msb'), corresponding to a (15,5) code.

Specify generator polynomial

Selecting this check box enables the field Generator polynomial.

Generator polynomial

This field is available only when Specify generator polynomial is selected.

A row vector that represents the binary coefficients of the generator polynomial in order of descending powers.

The length of the Generator polynomial must be N-K+1.

The default value is bchgenpoly(15,5).

Puncture code

Selecting this check box enables the field Puncture vector.

Puncture vector

This field is available only when Puncture code is selected.

A column vector of length N-K. A value of 1 in the Puncture vector corresponds to a bit that is not punctured, and a 0 corresponds to a bit that is punctured.

The default value is [ones(8,1); zeros(2,1)].

Enable erasures input port

Selecting this check box will open the ports, Era and Err.

Through the Era port, you can input a frame-based binary column vector the same size as the codeword input. The number of errors corrected is output through the Err port.

Erasure values of 1 correspond to erased bits in the same position in the codeword, and values of 0 correspond to nonerased bits.

Output number of corrected errors

Selecting this check box gives the block an additional output port, which indicates the number of errors the block detected in the input codeword.

Pair Block

BCH Encoder

References

[1] Wicker, Stephen B., Error Control Systems for Digital Communication and Storage, Upper Saddle River, N.J., Prentice Hall, 1995.

[2] Berlekamp, Elwyn R., Algebraic Coding Theory, New York, McGraw-Hill, 1968.

See Also

bchdec (Communications Toolbox)

  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

Your Ad Here