Communications Blockset | ![]() ![]() |
Decode a 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.
The Reed-Solomon code has message length K and codeword length N. You specify both N and K directly in the block mask. 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 the section Restrictions on the M and the Codeword Length N. The difference N-K must be an even integer.
The input and output are binary-valued signals that represent messages and codewords, respectively. The input must be a frame-based column vector whose length is an integer multiple of M*K. The output is a frame-based column vector whose length is the same integer multiple of M*N. For more information on representing data for Reed-Solomon codes, see the section Integer Format (Reed-Solomon only)."
The default value of M is the smallest integer that is greater than or equal to log2(N+1), that is ceil(log2(N+1))
. You can change the value of M from the default by specifying the primitive polynomial for GF(2M), as described in the section 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 the section Specifying the Generator Polynomial.
Each M*K input bits represent K integers between 0 and 2M-1. Similarly, each M*N 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.
You can disable the second output by clearing the box next to Output port for number of corrected errors. This removes the block's second output port.
Dialog Box
Pair Block
See Also
![]() | Binary Linear Encoder | Binary Symmetric Channel | ![]() |