| Communications Blockset™ | ![]() |
Block sublibrary of Channel Coding
This block supports punctures and erasures (Shortening, Puncturing, and Erasures provides a tutorial).
Note 1s and 0s have precisely opposite meanings for the puncture and erasure vectors. For a puncture vector, a 1 means that the data symbol is passed unaltered, and a 0 means that the data symbol is punctured (i.e., removed) from the data stream. For an erasure vector, a 1 means that the data symbol is to be replaced with an erasure symbol, and a 0 means that the data symbol is passed unaltered. These conventions are carried for both the encoder and the decoder. |
The Integer-Output RS Decoder block recovers a message vector from a Reed-Solomon codeword vector. For proper decoding, the parameter values in this block should match those in the corresponding Integer-Input RS Encoder block.
The Reed-Solomon code has message length, K, and codeword length, (N - number of punctures). You specify both N and K directly in the block dialog. The symbols for the code are integers between 0 and 2M-1, which represent elements of the finite field GF(2M). Restrictions on M and N are described in Restrictions on M and the Codeword Length N below. 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 integer-valued signals that represent codewords and messages, respectively. The input must be a frame-based column vector whose length is an integer multiple of (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 K, and whose data type is inherited from the input. For more information on representing data for Reed-Solomon codes, see the section Integer Format (Reed-Solomon Only) in the 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.
An (N, K) Reed-Solomon code can correct up to floor((N-K)/2) symbol errors (not bit errors) in each codeword.
The second output is 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 number of corrected errors. This removes the block's second output port.
The sample times of the input and output signals are equal.

The codeword length.
The message length.
Selecting this check box enables the field 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.
Selecting this check box enables the field 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.
Selecting this check box enables the field 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 symbol that is not punctured, and a 0 corresponds to a symbol that is punctured.
The default value is [ones(2,1); zeros(2,1)].
Selecting this check box will open the port, Era.
Through the port, you can input a frame-based binary column vector the same size as the codeword input.
Erasure values of 1 correspond to erased symbols in the same position in the codeword, and values of 0 correspond to nonerased symbols.
When you select this box, the block outputs the number of corrected errors in each word through a second output port.
This block uses the Berlekamp-Massey decoding algorithm. For information about this algorithm, see the references listed below.
[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.
![]() | Integer-Input RS Encoder | Integer to Bit Converter | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |