This program simulates Parallel Concatenated Convolutional Codes (PCCCs) of coding rate 1/3 using a turbo decoder with two SISO RSC modules.
Reference: S. Benedetto, D. Divsalar, G. Motorsi and F. Pollara, "A Soft-Input Soft-Output Maximum A posteriori (MAP) Module to Decode Parallel and Serial Concatenated Codes", TDA Progress Report, nov. 1996
using std::cout;
using std::endl;
using std::string;
{
ivec gen = "07 05";
double R = 1.0/3.0;
double Ec = 1.0;
vec sigma2 = (0.5*Ec/R)*pow(inv_dB(
EbN0_dB), -1.0);
double Lc;
bvec tail;
RNG_randomize();
{
{
{
}
{
}
{
}
}
}
return 0;
}
Ordinary AWGN Channel for cvec or vec inputs and outputs.
Array< T > left(int n) const
Get n left elements of the array.
int length() const
Returns the number of data elements in the array object.
Bit Error Rate Counter (BERC) Class.
BPSK modulator with real symbols.
void modulate_bits(const bvec &bits, vec &output) const
Modulate bits into BPSK symbols in complex domain.
void demodulate_bits(const vec &signal, bvec &output) const
Demodulate noisy BPSK symbols in complex domain into bits.
Automatic naming when saving.
A Recursive Systematic Convolutional Encoder/Decoder class.
Soft Input Soft Output (SISO) modules.
The IT++ file format reading and writing class.
Include file for the IT++ communications module.
Mat< bin > bmat
bin matrix
When you run this program, the results (BER and EbN0_dB) are saved into pccc_bersim_awgn.it file. Using the following MATLAB script:
clear all
itload('pccc_bersim_awgn.it');
figure
semilogy(EbN0_dB, BER, 'o-')
grid on
xlabel('E_b/N_0 [dB]')
ylabel('BER')
the results can be displayed.
Similarly, the results can be displayed using the following Python script (pyitpp, numpy and matplotlib modules are required):
#!/usr/bin/env python
from pyitpp import itload
from matplotlib.pyplot import *
out = itload('pccc_bersim_awgn.it')
semilogy(out['EbN0_dB'], out['BER'].T, 'o-')
grid()
xlabel('$E_b/N_0 [dB]$')
ylabel('$BER$')
show()