fec.rsdec - Construct Reed-Solomon decoder object

Synopsis

h = fec.rsdec

h = fec.rsdec(N,K)

h = fec.rsdec(property1, value1, ...)

h = fec.rsdec(rsenc_object)

Description

dec = fec.rsdec constructs a Reed-Solomon decoder with default properties. It is equivalent to dec = fec.rsdec(7,3)

dec = fec.rsdec(N,K) constructs an (N,K) Reed-Solomon decoder object dec.

dec = fec.rsdec(property1, value1, ...) constructs a Reed-Solomon decoder object dec with properties as specified by PROPERTY/VALUE pairs.

dec = fec.rsdec(rsenc_object) constructs a Reed-Solomon decoder object dec by reading the property values from the Reed-Solmon encoder object rsenc_object.

Properties

A Reed-Solomon decoder object has the following properties, all of which are writable, except for the ones explicitly noted otherwise.

PropertyDescription
TypeThe type of decoder object. This property also displays the effective message length and codeword length, taking shortening and puncturing into consideration. This property is not writable.
NThe codeword length of the base code, not including shortening or puncturing.
KThe uncoded message length, not including shortening.
TThe number of errors the base code is capable of correcting. This property is not writable.
ShortenedLengthThe number of symbols by which the code has been shortened.
ParityPositionMust be 'beginning' or 'end'. Specifies if parity bits should appear at the beginning or end of the codeword.
PuncturePatternIndicates which parity symbols in a codeword are punctured. This binary-valued vector is of length N-K. Values of "0" indicate symbols that are punctured, and values of "1" indicate symbols that are not.
GenPolyThe generator polynomial for the code. GENPOLY must be a Galois row vector that lists the coefficients, in order of descending powers, of the generator polynomial.

Methods

The fec.rsdec object has a method for encoding messages.

DECODED = DECODE(DEC,CODE)

Atempts to decode the received signal in CODE using the Reed-Solomon decoder DEC. CODE must be a vector of integer elements, with an integer multiple of N-ShortenedLength-(Number of punctures) elements per column. There may be multiple codewords per channel, where each group of N-ShortenedLength-(Number of punctures) input elements represents one codeword to be decoded. Each column of CODE is considered to be a separate channel, with the same Reed-Solomon code applied to each channel.

DECODED = DECODE(DEC,CODE,ERASURES)

Attempts to decode the received signal with the additional erasure information provided by the ERASURES vector. The size of the ERASURES vector must be the same as the size of CODE, where a 0 marks no erasure, and a 1 marks an erased symbol.

[DECODED,CNUMERR] = DECODE(...)

Returns an array CNUMERR with the same number of columns as CODE. Within each column of CNUMERR, each element is the number of corrected errors in the corresponding codeword of CODE. A value of -1 in CNUMERR indicates a decoding failure in that codeword in CODE.

[DECODED,CNUMERR,CCODE] = DECODE(...)

Returns CCODE, the corrected version of CODE. The array CCODE is in the same format as CODE. If a decoding failure occurs in a certain codeword (i.e. full or partial column of CODE), then the corresponding full or partial column in CCODE contains that full or partial column unchanged.

Usage Examples

% Code parameters
n = 7; k = 3;
% Construct encoder
coder = fec.rsenc(n,k);
% Message to encode
msg = [0 1 2]';
% Perform Coding
code = encode(coder,msg);
% Construct decoder from encoder
decoder = fec.rsdec(coder);
% Introduce 1 error in the codeword
code(end) = 0;
[decoded,cnumerr,ccode] = decode(decoder,code);

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.

  


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