IT++ Logo
Public Member Functions | List of all members
itpp::Rec_Syst_Conv_Code Class Reference

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

#include <itpp/comm/rec_syst_conv_code.h>

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.

Definition at line 51 of file rec_syst_conv_code.h.

Member Function Documentation

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
genA vector containing the generator polynomials of the RSC Code.
constraint_lengthThe Constraint length of the encoder.

Definition at line 69 of file rec_syst_conv_code.cpp.

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

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

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

Sets the channel parameters needed for MAP-decoding.

Parameters
Ecis the energy per channel symbol
N0is the single-sided power spectral density of the AWGN on the channel.

Definition at line 114 of file rec_syst_conv_code.cpp.

References itpp::sqrt().

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

Set scaling factor for the decoder.

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

Definition at line 119 of file rec_syst_conv_code.cpp.

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.

Definition at line 124 of file rec_syst_conv_code.cpp.

References itpp::length().

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

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_systematicIncluding both systematic bits and tail bits (if any)
rec_parityMatrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_inputFor all systematic bits
extrinsic_outputFor all systematic bits
set_terminatedEqual 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.

Definition at line 166 of file rec_syst_conv_code.cpp.

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

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

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_systematicIncluding both systematic bits and tail bits (if any)
rec_parityMatrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_inputFor all systematic bits
extrinsic_outputFor all systematic bits
set_terminatedEqual to true if the trellis was terminated by the encoder and false otherwise
metricMay 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.

Definition at line 283 of file rec_syst_conv_code.cpp.

References itpp::com_log, itpp::gamma(), 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 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_systematicIncluding both systematic bits and tail bits (if any)
rec_parityMatrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_inputFor all systematic bits
extrinsic_outputFor all systematic bits
set_terminatedEqual to true if the trellis was terminated by the encoder and false otherwise
metricMay 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.

Definition at line 404 of file rec_syst_conv_code.cpp.

References itpp::com_log, itpp::gamma(), 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().

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

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_systematicIncluding both systematic bits and tail bits (if any)
rec_parityMatrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_inputFor all systematic bits
extrinsic_outputFor all systematic bits
set_terminatedEqual to true if the trellis was terminated by the encoder and false otherwise

Definition at line 517 of file rec_syst_conv_code.cpp.

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

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_systematicIncluding both systematic bits and tail bits (if any)
rec_parityMatrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated)
extrinsic_inputFor all systematic bits
extrinsic_outputFor all systematic bits
set_terminatedEqual to true if the trellis was terminated by the encoder and false otherwise

Definition at line 628 of file rec_syst_conv_code.cpp.

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


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

Generated on Sat Jul 6 2013 10:54:33 for IT++ by Doxygen 1.8.2