Binary-Output RS Decoder

Decode Reed-Solomon code to recover binary vector data

Library

Block sublibrary of Channel Coding

Description

The Binary-Output RS Decoder block recovers a binary message vector from a binary Reed-Solomon codeword vector. For proper decoding, the parameter values in this block should match those in the corresponding Binary-Input RS Encoder block.

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

The Reed-Solomon code has message length, K, and codeword length, (N - number of punctures). You specify both N and K directly in the dialog box. The symbols for the code are binary sequences of length M, corresponding to elements of the Galois field GF(2M), where the first bit in each sequence is the most significant bit. Restrictions on M and N are described in Restrictions on the M and the Codeword Length N. The difference N-K must be an even integer.

This block can output shortened codewords when N and K are appropriately specified. To specify output codewords that are shortened by a length S, N and K must be specified in the dialog box as Nfull – S and Kfull – S, where Nfull and Kfull are the N and K of an unshortened code. If , the encoder can automatically determine the value of Nfull and Kfull. However, if , Primitive polynomial must be specified in order to properly define the extension field for the code.

The input and output are binary-valued signals that represent codewords and messages, respectively. The input must be a frame-based column vector whose length is an integer multiple of M*(N - number of punctures). The block can accept the data types int8, uint8, int16, uint16, int32, uint32, single, and double. The output is a frame-based column vector whose length is the same integer multiple of M*K, and whose data type is inherited from the input. For more information on representing data for Reed-Solomon codes, see Integer Format (Reed-Solomon Only) in Communications Blockset™ User's Guide.

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

The default value of M is ceil(log2(N+1)), that is, the smallest integer greater than or equal to log2(N+1). You can change the value of M from the default by specifying the primitive polynomial for GF(2M), as described in Specifying the Primitive Polynomial below. If N is less than 2M-1, the block uses a shortened Reed-Solomon code.

You can also specify the generator polynomial for the Reed-Solomon code, as described in Specifying the Generator Polynomial.

Each M*K input bits represent K integers between 0 and 2M-1. Similarly, each M*(N - number of punctures) output bits represent N integers between 0 and 2M-1. These integers in turn represent elements of the Galois field GF(2M).

The second output is a vector of the number of errors detected during decoding of the codeword. A -1 indicates that the block detected more errors than it could correct using the coding scheme. An (N,K) Reed-Solomon code can correct up to floor((N-K)/2) symbol errors (not bit errors) in each codeword. The data type of this output is also inherited from the input signal.

You can disable the second output by deselecting Output port for number of corrected errors. This removes the block's second output port.

Dialog Box

Codeword length N

The codeword length. The input has vector length NC*M*(N - NP), where NC is the number of codewords being output, and NP is the number of punctures per codeword.

Message length K

The message length. The first output has vector length NM*M*K, where NM is the number of messages per frame being output.

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.

Binary row vector representing the primitive polynomial in descending order of powers.

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.

Integer row vector, whose entries are in the range from 0 to 2M-1, representing the generator polynomial in descending order of powers.

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 an M-bit symbol that is not punctured, and a 0 corresponds to an M-bit symbol that is punctured.

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

Enable erasures input port

Selecting this check box will open the port, Era.

Through the port, you can input a frame-based binary column vector that is 1/M times as long as the codeword input.

Erasure values of 1 correspond to erased symbols in the same position in the bit-packed codeword, and values of 0 correspond to nonerased symbols.

Output number of corrected errors

When you select this box, the block outputs the number of corrected errors in each word through a second output port.

Output data type

The output type of the block can be specified as Same as input, boolean, or double. By default, the block sets this to Same as input.

Algorithm

This block uses the Berlekamp-Massey decoding algorithm. For information about this algorithm, see the references listed below.

Pair Block

Binary-Input RS 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.

[3] Clark, George C., Jr., and J. Bibb Cain, Error-Correction Coding for Digital Communications, New York, Plenum Press, 1981.

See Also

Integer-Output RS Decoder

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS