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
using namespace itpp;
using std::cout;
using std::endl;
using std::string;
int main(void)
{
vec sigmaA = "0.01:0.1:7";
double threshold_value = 50;
string map_metric = "maxlogMAP";
ivec gen = "07 05";
int constraint_length = 3;
int nb_blocks_lim = 10;
double EbN0_dB = 0.6;
double R = 1.0 / 3.0;
double Ec = 1.0;
vec sigma2A =
sqr(sigmaA);
int sigma2A_len = sigma2A.length();
int nb_bits = perm_len - (constraint_length - 1);
double sigma2 = (0.5 * Ec / R) *
pow(
inv_dB(EbN0_dB), -1.0);
double Lc = -2 / sigma2;
bvec bits(nb_bits);
bvec tail;
bvec bits_tail(perm_len);
int coded_bits_len = 2 * perm_len;
bvec coded_bits(coded_bits_len);
vec mod_bits(coded_bits_len);
vec rec_sig(coded_bits_len);
vec intrinsic_coded(coded_bits_len);
vec intrinsic_coded_p(2*nb_bits);
intrinsic_coded_p.zeros();
vec apriori_data(perm_len);
vec extrinsic_coded;
vec extrinsic_data;
vec apriori_mutual_info(sigma2A_len);
vec extrinsic_mutual_info(sigma2A_len);
vec extrinsic_mutual_info_p(sigma2A_len);
extrinsic_mutual_info.zeros();
extrinsic_mutual_info_p.zeros();
register int en, n, nb_blocks;
for (en = 0;en < sigma2A_len;en++) {
cout << "I_A = " << apriori_mutual_info(en) << endl;
for (nb_blocks = 0;nb_blocks < nb_blocks_lim;nb_blocks++) {
bits_tail =
concat(bits, tail);
for (n = 0;n < perm_len;n++) {
coded_bits(2*n) = bits_tail(n);
coded_bits(2*n + 1) = parity_bits(n, 0);
}
rec_sig = channel(mod_bits);
intrinsic_coded = Lc * rec_sig;
siso.
rsc(extrinsic_coded, extrinsic_data, intrinsic_coded, apriori_data,
true);
for (n = 0;n < nb_bits;n++)
intrinsic_coded_p(2*n + 1) = Lc * rec_sig(2 * n + 1);
siso.
rsc(extrinsic_coded, extrinsic_data, intrinsic_coded_p, apriori_data,
false);
}
extrinsic_mutual_info(en) /= nb_blocks_lim;
extrinsic_mutual_info_p(en) /= nb_blocks_lim;
}
ff <<
Name(
"IA") << apriori_mutual_info;
ff <<
Name(
"IE") << extrinsic_mutual_info;
ff <<
Name(
"IE_p") << extrinsic_mutual_info_p;
ff <<
Name(
"EbN0_dB") << EbN0_dB;
ff <<
Name(
"gen") << gen;
ff <<
Name(
"perm_len") << perm_len;
ff <<
Name(
"nb_blocks_lim") << nb_blocks_lim;
ff.close();
return 0;
}
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
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'])
the EXIT chart can be displayed.