itpp::Rec_Syst_Conv_Code Class Reference
[Forward Error Correcting Codes]

A Recursive Systematic Convolutional Encoder/Decoder class. More...

#include <rec_syst_conv_code.h>

List of all members.

Public Member Functions

 Rec_Syst_Conv_Code ()
 Class constructor.
virtual ~Rec_Syst_Conv_Code ()
 Class constructor.
void set_generator_polynomials (const ivec &gen, int constraint_length)
 Set generator polynomials.
void set_awgn_channel_parameters (double Ec, double N0)
 Sets the channel parameters needed for MAP-decoding.
void set_scaling_factor (double in_Lc)
 Set scaling factor for the decoder.
void set_llrcalc (LLR_calc_unit in_llrcalc)
 Set the lookup table for algebra with quantized LLR values (see LLR_calc_unit class).
void encode_tail (const bvec &input, bvec &tail, bmat &parity_bits)
 Encode a binary vector of inputs and also adds a tail of K-1 zeros to force the encoder into the zero state.
void encode (const bvec &input, bmat &parity_bits)
 Encode a binary vector of inputs starting from zero state without adding of a tail.
virtual void map_decode (const vec &rec_systematic, const mat &rec_parity, const vec &extrinsic_input, vec &extrinsic_output, bool set_terminated=false)
 Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.
virtual void log_decode (const vec &rec_systematic, const mat &rec_parity, const vec &extrinsic_input, vec &extrinsic_output, bool set_terminated=false, std::string metric="LOGMAX")
 Log domain implementation of the Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.
virtual void log_decode_n2 (const vec &rec_systematic, const vec &rec_parity, const vec &extrinsic_input, vec &extrinsic_output, bool set_terminated=false, std::string metric="LOGMAX")
 Special Log-MAP/Log-MAX decoder implementation for n = 2.
virtual void log_decode (const QLLRvec &rec_systematic, const QLLRmat &rec_parity, const QLLRvec &extrinsic_input, QLLRvec &extrinsic_output, bool set_terminated=false)
 Implementation of the log-map decoder using quantized LLR values (the QLLR type) and table-lookup (using the LLR_calc_unit class).
virtual void log_decode_n2 (const QLLRvec &rec_systematic, const QLLRvec &rec_parity, const QLLRvec &extrinsic_input, QLLRvec &extrinsic_output, bool set_terminated=false)
 Implementation of the log-map decoder for the n=2 case using quantized LLR values (the QLLR type) and table-lookup (using the LLR_calc_unit class).
Rec_Syst_Conv_Codeoperator= (const Rec_Syst_Conv_Code &)
 Dummy assignment operator - MSVC++ warning C4512.


Detailed Description

A Recursive Systematic Convolutional Encoder/Decoder class.

The main purpose of this class is to be used by the Turbo_Codec class which uses two recursive systematic convolutional encoders. It can however be used as a stand alone class. The map_decode member function implementation follows the paper "A Turbo Code Tutorial" by William E. Ryan, New Mexico State University. This paper was found on the web and is probably unpublished.


Member Function Documentation

void itpp::Rec_Syst_Conv_Code::encode_tail ( const bvec &  input,
bvec &  tail,
bmat parity_bits 
)

Encode a binary vector of inputs and also adds a tail of K-1 zeros to force the encoder into the zero state.

The encoder remembers that the trellis is terminated in the zero state at the end of the input block. This is then utilized by the decoder when going through the trellis in the reverse direction. The tailbits used are returned in tail. Parity bits for both the input part and the tail part of the data are returned in the matrix parity bits.

References itpp::length().

Referenced by itpp::Turbo_Codec::encode_block().

void itpp::Rec_Syst_Conv_Code::log_decode ( const QLLRvec &  rec_systematic,
const QLLRmat &  rec_parity,
const QLLRvec &  extrinsic_input,
QLLRvec &  extrinsic_output,
bool  set_terminated = false 
) [virtual]

Implementation of the log-map decoder using quantized LLR values (the QLLR type) and table-lookup (using the LLR_calc_unit class).

Parameters:
rec_systematic Including both systematic bits and tail bits (if any)
rec_parity Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_input For all systematic bits
extrinsic_output For all systematic bits
set_terminated Equal to true if the trellis was terminated by the encoder and false otherwise

References it_assert, and itpp::LLR_calc_unit::jaclog().

void itpp::Rec_Syst_Conv_Code::log_decode ( const vec &  rec_systematic,
const mat &  rec_parity,
const vec &  extrinsic_input,
vec &  extrinsic_output,
bool  set_terminated = false,
std::string  metric = "LOGMAX" 
) [virtual]

Log domain implementation of the Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.

The extrinsic_input is the a priori information on each systematic bit. If no a priori information is available, this vector should contain only zeros. The extrinsic_output term may be passed to a subsequent decoder in a Turbo scheme. The decision variable is

 L = Lc*rec_systematic + extrinsic_output + extrinsic_input 
where
 Lc = 4*sqrt(Ec)/N0 

Parameters:
rec_systematic Including both systematic bits and tail bits (if any)
rec_parity Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_input For all systematic bits
extrinsic_output For all systematic bits
set_terminated Equal to true if the trellis was terminated by the encoder and false otherwise
metric May be "LOGMAP", "LOGMAX" (default), or "TABLE"
Note: Unless LOGMAX decoding is desired, it is recommended to use the TABLE metric instead of LOGMAP as the table-based decoder is much faster and numerically stable.

References it_assert, it_error, itpp::length(), itpp::log_add(), itpp::max(), itpp::LLR_calc_unit::to_double(), and itpp::LLR_calc_unit::to_qllr().

Referenced by itpp::Turbo_Codec::decode_block().

void itpp::Rec_Syst_Conv_Code::log_decode_n2 ( const QLLRvec &  rec_systematic,
const QLLRvec &  rec_parity,
const QLLRvec &  extrinsic_input,
QLLRvec &  extrinsic_output,
bool  set_terminated = false 
) [virtual]

Implementation of the log-map decoder for the n=2 case using quantized LLR values (the QLLR type) and table-lookup (using the LLR_calc_unit class).

Parameters:
rec_systematic Including both systematic bits and tail bits (if any)
rec_parity Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_input For all systematic bits
extrinsic_output For all systematic bits
set_terminated Equal to true if the trellis was terminated by the encoder and false otherwise

References it_assert, itpp::LLR_calc_unit::jaclog(), and itpp::norm().

void itpp::Rec_Syst_Conv_Code::log_decode_n2 ( const vec &  rec_systematic,
const vec &  rec_parity,
const vec &  extrinsic_input,
vec &  extrinsic_output,
bool  set_terminated = false,
std::string  metric = "LOGMAX" 
) [virtual]

Special Log-MAP/Log-MAX decoder implementation for n = 2.

Parameters:
rec_systematic Including both systematic bits and tail bits (if any)
rec_parity Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_input For all systematic bits
extrinsic_output For all systematic bits
set_terminated Equal to true if the trellis was terminated by the encoder and false otherwise
metric May be "LOGMAP", "LOGMAX" (default), or "TABLE"
Note: Unless LOGMAX decoding is desired, it is recommended to use the TABLE metric instead of LOGMAP as the table-based decoder is much faster and numerically stable.

References it_assert, it_error, itpp::length(), itpp::log_add(), itpp::max(), itpp::norm(), itpp::LLR_calc_unit::to_double(), and itpp::LLR_calc_unit::to_qllr().

void itpp::Rec_Syst_Conv_Code::map_decode ( const vec &  rec_systematic,
const mat &  rec_parity,
const vec &  extrinsic_input,
vec &  extrinsic_output,
bool  set_terminated = false 
) [virtual]

Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.

The extrinsic_input is the a priori information on each systematic bit. If no a priori information is available, this vector should contain only zeros. The extrinsic_output term may be passed to a subsequent decoder in a Turbo scheme. The decision variable is

 L = Lc*rec_systematic + extrinsic_output + extrinsic_input 
where
 Lc = 4*sqrt(Ec)/N0 

Parameters:
rec_systematic Including both systematic bits and tail bits (if any)
rec_parity Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_input For all systematic bits
extrinsic_output For all systematic bits
set_terminated Equal to true if the trellis was terminated by the encoder and false otherwise
Note: It is recommended to use the log_decode() decoder instead, as it is much faster and more numerically stable.

References itpp::trunc_exp(), itpp::trunc_log(), and itpp::zeros().

Referenced by itpp::Turbo_Codec::decode_block().

void itpp::Rec_Syst_Conv_Code::set_awgn_channel_parameters ( double  Ec,
double  N0 
)

Sets the channel parameters needed for MAP-decoding.

Parameters:
Ec is the energy per channel symbol
N0 is the single-sided power spectral density of the AWGN on the channel.

References itpp::sqrt().

void itpp::Rec_Syst_Conv_Code::set_generator_polynomials ( const ivec &  gen,
int  constraint_length 
)

Set generator polynomials.

The generator polynomials are given in Proakis integer form. First generator (gen(0)) is the recursive polynomial.

Parameters:
gen A vector containing the generator polynomials of the RSC Code.
constraint_length The Constraint length of the encoder.

References itpp::log(), and itpp::reverse_int().

Referenced by itpp::Turbo_Codec::set_parameters().

void itpp::Rec_Syst_Conv_Code::set_scaling_factor ( double  in_Lc  ) 

Set scaling factor for the decoder.

Parameters:
in_Lc is the channel reliability factor (i.e. Lc = 4 x sqrt( Ec ) / N0)


The documentation for this class was generated from the following files:

Generated on Tue Jun 2 10:02:19 2009 for mixpp by  doxygen 1.5.8