This program shows the usage of Soft-Input Soft-Output (SISO) demappers with Space Time (ST) codes in Multiple-Input Multiple-Output (MIMO) channels. The ST codes are generated using the STC class, the MIMO channels are ideal (no multi-antenna interferrence and no noise) and the receiver is implemented by the demapper method of the SISO class.
using std::cout;
using std::endl;
using std::string;
{
cout <<
"Usage: " <<
prog_name <<
" [options]\n"
<< "Available options:\n"
<< "-d demapper_method: sets the demapper method. Available demapper "
"methods: Hassibi_maxlogMAP, GA, sGA, mmsePIC, zfPIC and Alamouti_maxlogMAP.\n"
<< "-s code_name: sets the ST code name. Available code names: Golden_2x2, "
"V-BLAST_MxN, Damen_2x2, Alamouti_2xN.\n"
<< "-c const_size: sets the constellation size\n"
<< "-e nb_errors_lim: sets the limit for the number of bit errors\n"
<< "-b nb_bits_lim: sets the limit for the number of bits to send\n"
<< "-p perm_len: sets the length of the permutation\n"
<< "-i nb_iter: sets the number of iterations\n"
<< "-t em_antennas: sets the number of emission antenna\n"
<< "-r rec_antennas: sets the number of reception antenna\n"
<< "-u channel_uses: sets the number of channel uses\n"
<< "-g: enables the ideal Gaussian MIMO channel (no MAI). Available only "
"if em_antennas == rec_antennas.\n"
<< "-n EbN0_dB_min: sets the lower limit for the SNR [dB]\n"
<< "-m EbN0_dB_max: sets the upper limit for the SNR [dB]\n"
<< "-l EbN0_dB_step: step for the SNR vector [dB]\n"
<< "-h: displays this help message" << endl;
}
int get_opts(
int argc,
char *
argv[], std::string &demapper_method,
int &const_size,
{
{
{
case 'h':
case 'd':
break;
case 'c':
break;
case 'e':
break;
case 'b':
break;
case 'p':
break;
case 'i':
break;
case 'r':
break;
case 't':
break;
case 'u':
break;
case 's':
break;
case 'g':
break;
case 'f':
break;
case 'n':
break;
case 'm':
break;
case 'l':
break;
default:
}
}
{
for (
int n = 1; n <
size; ++n)
{
}
}
}
{
ivec gen = "0133 0171";
int const_size = 16;
string demapper_method = "mmsePIC";
int channel_uses = 1;
string code_name = "V-BLAST_MxN";
{
}
std::cout << "const_size = " << const_size
<< "\ndemapper_method = " << demapper_method
<< "\ncode_name = " << code_name
<< "\nchannel_uses = " << channel_uses
<<
"\nEbN0_dB = " <<
EbN0_dB << std::endl;
{
{
std::cout << "Using ideal AWGN MIMO channel (no MAI)" << std::endl;
} else
{
std::cout << "Warning: cannot use ideal AWGN MIMO channel" << std::endl;
}
} else
{
std::cout << "Using random MIMO channel (with MAI)" << std::endl;
}
{
std::cout << "Warning! The coherence time must be a multiple of T. Choosing coherence_time=channel_uses*floor(coherence_time/channel_uses) = "\
}
{
std::cout << "Warning! The coherence time must be <= tx_duration. Choosing coherence_time = channel_uses*floor(tx_duration/channel_uses) = "\
}
{
std::cout <<
"Saving results to " <<
filename << std::endl;
}
siso.set_demapper_method(demapper_method);
std::cout << std::endl;
{
std::cout <<
"EbN0_dB = " <<
EbN0_dB[
en] << std::endl;
{
{
} else
{
}
rec.set_submatrix(
ns*channel_uses, 0, \
{
}
}
}
{
ff <<
Name(
"const_size") << const_size;
} else
{
cout <<
"BER = " <<
ber << endl;
}
return 0;
}
void set_size(int n, bool copy=false)
Resizing an Array<T>.
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 demodulate_bits(const vec &signal, bvec &output) const
Demodulate noisy BPSK symbols in complex domain into bits.
Binary Convolutional rate 1/n class.
void set_generator_polynomials(const ivec &gen, int constraint_length)
Set generator polynomials. Given in Proakis integer form.
virtual void encode(const bvec &input, bvec &output)
Encode an input binary vector using specified method (Tail by default)
Automatic naming when saving.
M-ary QAM modulator with square lattice.
Soft Input Soft Output (SISO) modules.
Space Time block Codes (STC) class.
The IT++ file format reading and writing class.
vec pow(const double x, const vec &y)
Calculates x to the power of y (x^y)
int pow2i(int x)
Calculate two to the power of x (2^x); x is integer.
double inv_dB(double x)
Inverse of decibel of x.
Mat< Num_T > kron(const Mat< Num_T > &X, const Mat< Num_T > &Y)
Computes the Kronecker product of two matrices.
int size(const Vec< T > &v)
Length of vector.
int length(const Vec< T > &v)
Length of vector.
int mod(int k, int n)
Calculates the modulus, i.e. the signed reminder after division.
vec sqrt(const vec &x)
Square root of the elements.
void RNG_randomize()
Set a random seed for all Random Number Generators in the current thread.
double randu(void)
Generates a random uniform (0,1) number.
std::complex< double > randn_c(void)
Generates a random complex Gaussian (0,1) variable.
bin randb(void)
Generates a random bit (equally likely 0s and 1s)
Mat< T > reshape(const Mat< T > &m, int rows, int cols)
Reshape the matrix into an rows*cols matrix.
ITPP_EXPORT cmat eye_c(int size)
A Double Complex (size,size) unit matrix.
ITPP_EXPORT cvec ones_c(int size)
A float Complex vector of ones.
Include file for the IT++ communications module.