IT++ Logo
EXIT chart of PCCCs

This program computes the EXtrinsic Information Transfer (EXIT) chart for Parallel Concatenated Convolutional Codes (PCCCs) of coding rate 1/3. Actually the Transfer Characteristics (TCs) of the two SISO RSC modules used in the turbo decoder are computed at a given Signal to Noise Ratio (SNR).

Reference: S. ten Brink, ''Convergence behavior of iteratively decoded parallel concatenated codes,`` IEEE Transactions on Communications, vol. 49, pp. 1727-1737, Oct. 2001

#include "itpp/itcomm.h"
using namespace itpp;
using std::cout;
using std::endl;
using std::string;
int main(void)
{
//general parameters
vec sigmaA = "0.01:0.1:7";//standard deviation (sqrt(variance)) of the mutual a priori information
double threshold_value = 50;
string map_metric = "maxlogMAP";
ivec gen = "07 05";//octal form
int nb_blocks_lim = 10;
int perm_len = int(itpp::pow10(5.0));//total number of bits in a block (with tail)
double EbN0_dB = 0.6;
double R = 1.0 / 3.0;//coding rate of PCCC
double Ec = 1.0;//coded bit energy
//other parameters
vec sigma2A = sqr(sigmaA);
int nb_bits = perm_len - (constraint_length - 1);//number of bits in a block (without tail)
double sigma2 = (0.5 * Ec / R) * pow(inv_dB(EbN0_dB), -1.0);//N0/2
double Lc = -2 / sigma2;//normalisation factor for intrinsic information (take into account the BPSK modulation)
bvec bits(nb_bits);
bvec tail;
vec apriori_mutual_info(sigma2A_len);
vec extrinsic_mutual_info(sigma2A_len);
extrinsic_mutual_info.zeros();
register int en, n, nb_blocks;
//Recursive Systematic Convolutional Code
rsc.set_generator_polynomials(gen, constraint_length);//initial state should be the zero state
//BPSK modulator
BPSK bpsk;
//AWGN channel
channel.set_noise(sigma2);
//SISO module
siso.set_generators(gen, constraint_length);
siso.set_map_metric(map_metric);
//EXIT chart
//Randomize generators
RNG_randomize();
//main loop
for (en = 0;en < sigma2A_len;en++) {
apriori_mutual_info(en) = exit.apriori_mutual_info(sigma2A(en));//a priori mutual info
cout << "I_A = " << apriori_mutual_info(en) << endl;
//bits generation
bits = randb(nb_bits);
//RSC code
rsc.encode_tail(bits, tail, parity_bits);//tail is added
//form coder output
bits_tail = concat(bits, tail);
for (n = 0;n < perm_len;n++) {
coded_bits(2*n) = bits_tail(n);//systematic output
coded_bits(2*n + 1) = parity_bits(n, 0);//parity output
}
//BPSK modulation (1->-1,0->+1)
//AWGN channel
//first SISO RSC module (tail is added)
//intrinsic info. of coded bits
//a priori info. of data bits
apriori_data = exit.generate_apriori_info(bits_tail);
//SISO RSC module
//threshold
//extrinsic mutual info
extrinsic_mutual_info(en) += exit.extrinsic_mutual_info(extrinsic_data.left(nb_bits), bits);
//second SISO RSC module (no tail added)
//intrinsic info. of coded bits
for (n = 0;n < nb_bits;n++)
intrinsic_coded_p(2*n + 1) = Lc * rec_sig(2 * n + 1);//parity bits only
//a priori info. of data bits
apriori_data = exit.generate_apriori_info(bits);
//SISO RSC module
//threshold
//extrinsic mutual info
extrinsic_mutual_info_p(en) += exit.extrinsic_mutual_info(extrinsic_data, bits);
}//end blocks (while loop)
//mean extrinsic mutual info over all blocks
extrinsic_mutual_info(en) /= nb_blocks_lim;
}
it_file ff("exit_pccc.it");
ff << Name("IA") << apriori_mutual_info;
ff << Name("IE") << extrinsic_mutual_info;
ff << Name("EbN0_dB") << EbN0_dB;
ff << Name("gen") << gen;
ff << Name("R") << R;
ff << Name("perm_len") << perm_len;
ff << Name("nb_blocks_lim") << nb_blocks_lim;
ff.close();
return 0;
}
Ordinary AWGN Channel for cvec or vec inputs and outputs.
Definition channel.h:1089
General array class.
Definition array.h:105
Array< T > left(int n) const
Get n left elements of the array.
Definition array.h:357
int length() const
Returns the number of data elements in the array object.
Definition array.h:157
BPSK modulator with real symbols.
Definition modulator.h:877
void modulate_bits(const bvec &bits, vec &output) const
Modulate bits into BPSK symbols in complex domain.
EXtrinsic Information Transfer (EXIT) chart.
Definition exit.h:56
Automatic naming when saving.
Definition itfile.h:429
A Recursive Systematic Convolutional Encoder/Decoder class.
void set_generator_polynomials(const ivec &gen, int constraint_length)
Set generator polynomials.
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...
Soft Input Soft Output (SISO) modules.
Definition siso.h:72
The IT++ file format reading and writing class.
Definition itfile.h:246
double pow10(double x)
Calculate ten to the power of x (10^x)
Definition log_exp.h:68
Include file for the IT++ communications module.
Mat< bin > bmat
bin matrix
Definition mat.h:508
itpp namespace
Definition itmex.h:37

When you run this program, the results (mutual a priori and extrinsic information, EbN0_dB, etc.) are saved into exit_pccc.it file. Using the following MATLAB script

clear all
itload('exit_pccc.it')
plot(IA, IE, 'LineWidth', 3)
hold on
plot(IE_p, IA, 'LineWidth', 3)
xlabel('I_A^{(up)}, I_E^{(low)}')
ylabel('I_E^{(up)}, I_A^{(low)}')
grid on
title(['E_b/N_0 = ' num2str(EbN0_dB) ' dB'])
double dB(double x)
Decibel of x (10*log10(x))
Definition log_exp.h:71

the EXIT chart can be displayed.

Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.8