itpp::ND_UPAM Class Reference
[Digital Modulation]

Real-valued MIMO channel with uniform PAM along each dimension. More...

#include <modulator_nd.h>

List of all members.

Public Types

enum  Soft_Demod_Method { FULL_ENUM_LOGMAP, ZF_LOGMAP }
 Soft demodulation method. More...

Public Member Functions

 ND_UPAM (int nt=1, int Mary=2)
 Constructor.
 ~ND_UPAM ()
 Destructor.
void set_M (int nt=1, int Mary=2)
 Set component modulators to M-PAM with Gray mapping.
void set_M (int nt=1, ivec Mary="2")
 Set component modulators to M-PAM with Gray mapping, different M per component.
int sphere_decoding (const vec &y, const mat &H, double rmin, double rmax, double stepup, QLLRvec &detected_bits)
 Sphere decoding.
Array< vec > get_symbols () const
 Get modulation symbols per dimension.
void modulate_bits (const bvec &bits, vec &symbols) const
 Modulate bits into symbols.
vec modulate_bits (const bvec &bits) const
 Modulate bits vector. Symbols are returned.
void demodulate_soft_bits (const vec &y, const mat &H, double sigma2, const QLLRvec &LLR_apriori, QLLRvec &LLR_aposteriori, Soft_Demod_Method method)
 Soft demodulation wrapper function for various methods.
QLLRvec demodulate_soft_bits (const vec &y, const mat &H, double sigma2, const QLLRvec &LLR_apriori, Soft_Demod_Method method)
 Soft demodulation wrapper function for various methods.
void demodulate_soft_bits (const vec &y, const mat &H, double sigma2, const QLLRvec &LLR_apriori, QLLRvec &LLR_aposteriori)
 Soft MAP demodulation for multidimensional channel, by "brute-force" enumeration of all constellation points.
void demodulate_soft_bits (const vec &y, const vec &h, double sigma2, const QLLRvec &LLR_apriori, QLLRvec &LLR_aposteriori)
 Soft MAP demodulation for parallelchannels without crosstalk.
void set_llrcalc (LLR_calc_unit llrcalc_in)
 Set LLR calculation unit.
LLR_calc_unit get_llrcalc () const
 Get LLR calculation unit.
int get_dim () const
 Get number of dimensions.
ivec get_k () const
 Get number of bits per modulation symbol per dimension.
ivec get_M () const
 Get number of modulation symbols per dimension.

Protected Member Functions

void update_norm (double &norm, int k, int sold, int snew, const vec &ytH, const mat &HtH, const ivec &s)
 Update residual norm (for internal use).
QLLRvec probabilities (QLLR l)
 Convert LLR to log-probabilities.
Array< QLLRvec > probabilities (const QLLRvec &l)
 Convert LLR to log-probabilities, vector version.
void update_LLR (const Array< QLLRvec > &logP_apriori, const ivec &s, QLLR scaled_norm, QLLRvec &num, QLLRvec &denom)
 Update LLR (for internal use).
void update_LLR (const Array< QLLRvec > &logP_apriori, int s, QLLR scaled_norm, int j, QLLRvec &num, QLLRvec &denom)
 Update LLR, for scalar channel (for internal use).

Protected Attributes

Array< vec > symbols
 Vectors of modulation symbols (along each dimension).
int nt
 Number of dimensions.
LLR_calc_unit llrcalc
 LLR calculation unit.
ivec k
 Number of bits per modulation symbol.
ivec M
 Number of modulation symbols along each dimension.
Array< bmatbitmap
 Bit mapping table (one table per dimension).
Array< ivec > bits2symbols
 Bit pattern in decimal form ordered and the corresponding symbols (one pattern per dimension).

Friends

std::ostream & operator<< (std::ostream &os, const Modulator_NRD &m)
 Output some properties of the MIMO modulator (mainly to aid debugging).


Detailed Description

Real-valued MIMO channel with uniform PAM along each dimension.

Example: (4 x 3 matrix channel with 4-PAM)

 ND_UPAM chan; // multidimensional channel with uniform PAM
 chan.set_M(3, 4); // 3-dimensional matrix channel, 4-PAM per dimension
 cout << chan << endl;
 bvec b = randb(3*2); // 3*2 bits in total
 vec x = chan.modulate_bits(b);
 mat H = randn(4,3); // 4 x 3 real matrix channel
 double sigma2 = 0.01; // noise variance per real dimension
 vec y = H*x + sqrt(sigma2)*randn(4); // transmit vector x
 QLLRvec llr; // log-likelihood ratios
 QLLRvec llr_ap = zeros_i(3*2);  // a priori equiprobable bits
 chan.demodulate_soft_bits(y, H, sigma2, llr_ap, llr);
 cout << "True bits:" << b << endl;
 cout << "LLRs:" << chan.get_llrcalc().to_double(llr) << endl;

Example: (scalar channel with 8-PAM)

 ND_UPAM chan;
 chan.set_M(1, 8); // scalar channel, 8-PAM (3 bits per symbol)
 cout << chan << endl;
 bvec b = randb(3);
 vec x = chan.modulate_bits(b);
 mat H = "1.0";      // scalar channel
 double sigma2 = 0.01;
 vec y= H*x + sqrt(sigma2)*randn(); // transmit vector x
 QLLRvec llr;
 QLLRvec llr_ap = zeros_i(3);
 chan.demodulate_soft_bits(y, H, sigma2, llr_ap, llr);
 cout << "True bits:" << b << endl;
 cout << "LLRs:" << chan.get_llrcalc().to_double(llr) << endl;

Member Enumeration Documentation

Soft demodulation method.

Enumerator:
FULL_ENUM_LOGMAP  Log-MAP demodulation by "brute-force" enumeration of all points.
ZF_LOGMAP  Zero-Forcing Log-MAP approximated demodulation.


Member Function Documentation

void itpp::Modulator_NRD::demodulate_soft_bits ( const vec &  y,
const vec &  h,
double  sigma2,
const QLLRvec &  LLR_apriori,
QLLRvec &  LLR_aposteriori 
) [inherited]

Soft MAP demodulation for parallelchannels without crosstalk.

This function is a much faster equivalent to demodulate_soft_bits with $H = \mbox{diag}(h)$. Its complexity is linear in the number of subchannels.

References it_assert, itpp::Modulator_ND::k, itpp::length(), itpp::Modulator_ND::llrcalc, itpp::Modulator_ND::M, itpp::Modulator_ND::nt, itpp::ones_i(), itpp::Modulator_ND::probabilities(), itpp::sqr(), itpp::sum(), itpp::Modulator_NRD::symbols, itpp::LLR_calc_unit::to_qllr(), and itpp::Modulator_ND::update_LLR().

void itpp::Modulator_NRD::demodulate_soft_bits ( const vec &  y,
const mat &  H,
double  sigma2,
const QLLRvec &  LLR_apriori,
QLLRvec &  LLR_aposteriori 
) [inherited]

Soft MAP demodulation for multidimensional channel, by "brute-force" enumeration of all constellation points.

This function computes the LLR values

\[ LLR(k) = \log \left( \frac {\sum_{s:b_k=0} \exp \left( -\frac{|y - Hs|^2}{2\sigma^2} \right) P(s)} {\sum_{s:b_k=1} \exp \left( -\frac{|y - Hs|^2}{2\sigma^2} \right) P(s)} \right) \]

without approximations. It is assumed that H, y and s are real-valued. Complex-valued channels can be handled using the Modulator_NCD class.

Parameters:
[in] y Received vector
[in] H Channel matrix
[in] sigma2 Noise variance per real dimension (typically $N_0/2$)
[in] LLR_apriori Vector of a priori LLR values per bit
[out] LLR_aposteriori Vector of a posteriori LLR values
The function performs an exhaustive search over all possible points s in the n-dimensional constellation. This is only feasible for relatively small constellations. The Jacobian logarithm is used to compute the sum-exp expression.

References it_assert, itpp::Modulator_ND::k, itpp::length(), itpp::Modulator_ND::llrcalc, itpp::Modulator_ND::M, itpp::norm(), itpp::Modulator_ND::nt, itpp::ones_i(), itpp::Modulator_ND::probabilities(), itpp::sqr(), itpp::sum(), itpp::Modulator_NRD::symbols, itpp::LLR_calc_unit::to_qllr(), itpp::Modulator_ND::update_LLR(), itpp::Modulator_NRD::update_norm(), and itpp::zeros_i().

QLLRvec itpp::Modulator_NRD::demodulate_soft_bits ( const vec &  y,
const mat &  H,
double  sigma2,
const QLLRvec &  LLR_apriori,
Soft_Demod_Method  method 
) [inherited]

Soft demodulation wrapper function for various methods.

Currently the following two demodulation methods are supported:

  • FULL_ENUM_LOGMAP - exact demodulation, which use "brute-force" enumeration of all constellation points
  • ZF_LOGMAP - approximated methods with Zero-Forcing preprocessing, which sometimes tends to perform poorly, especially for poorly conditioned H

Parameters:
[in] y Received vector
[in] H Channel matrix
[in] sigma2 Noise variance per real dimension (typically $N_0/2$)
[in] LLR_apriori Vector of a priori LLR values per bit
[in] method Soft demodulation method
Returns:
Vector of a posteriori LLR values

References itpp::Modulator_NRD::demodulate_soft_bits().

void itpp::Modulator_NRD::demodulate_soft_bits ( const vec &  y,
const mat &  H,
double  sigma2,
const QLLRvec &  LLR_apriori,
QLLRvec &  LLR_aposteriori,
Soft_Demod_Method  method 
) [inherited]

Soft demodulation wrapper function for various methods.

Currently the following two demodulation methods are supported:

  • FULL_ENUM_LOGMAP - exact demodulation, which use "brute-force" enumeration of all constellation points
  • ZF_LOGMAP - approximated methods with Zero-Forcing preprocessing, which sometimes tends to perform poorly, especially for poorly conditioned H

Parameters:
[in] y Received vector
[in] H Channel matrix
[in] sigma2 Noise variance per real dimension (typically $N_0/2$)
[in] LLR_apriori Vector of a priori LLR values per bit
[out] LLR_aposteriori Vector of a posteriori LLR values
[in] method Soft demodulation method

References itpp::Modulator_ND::FULL_ENUM_LOGMAP, itpp::inv(), it_assert, it_error, itpp::Modulator_ND::k, itpp::ones(), itpp::sqrt(), itpp::sum(), itpp::zeros_i(), and itpp::Modulator_ND::ZF_LOGMAP.

Referenced by itpp::Modulator_NRD::demodulate_soft_bits().

int itpp::ND_UPAM::sphere_decoding ( const vec &  y,
const mat &  H,
double  rmin,
double  rmax,
double  stepup,
QLLRvec &  detected_bits 
)

Sphere decoding.

This function solves the integer-constrained minimization problem

\[ \mbox{min} |y - Hs| \]

with respect to $s$ using a sphere decoding algorithm and the Schnorr-Eucner search strategy (see the source code for further implementation notes). The function starts with an initial search radius and increases it with a factor (stepup) until the search succeeds.

Parameters:
[in] y received data vector ($n_r\times 1$)
[in] H channel matrix ($n_r\times n_t$)
[in] rmax maximum possible sphere radius to try
[in] rmin sphere radius in the first try
[in] stepup factor with which the sphere radius is increased if the search fails
[out] detected_bits result of the search (hard decisions only, QLLR for a sure "1" is set to 1000)
Returns:
status of the decoding: 0 if the search suceeds, -1 otherwise

References itpp::Modulator_ND::bitmap, it_assert, itpp::Modulator_ND::k, itpp::length(), itpp::Modulator_ND::M, itpp::Modulator_ND::nt, and itpp::sum().

void itpp::Modulator_ND::update_LLR ( const Array< QLLRvec > &  logP_apriori,
int  s,
QLLR  scaled_norm,
int  j,
QLLRvec &  num,
QLLRvec &  denom 
) [protected, inherited]

Update LLR, for scalar channel (for internal use).

This function updates the numerator and denominator in the expression

\[ \log \left( \frac {\sum_{s:b_k=0} \exp (-x^2) P(s)} {\sum_{s:b_k=1} \exp (-x^2) P(s)} \right) \]

Parameters:
[in] logP_apriori Vector of a priori probabilities per bit
[in] s Symbol
[in] scaled_norm Argument of the exponents in the above equation
[in] j Channel index (dimension)
[out] num Logarithm of the numerator in the above expression
[out] denom Logarithm of the denominator in the above expression

References itpp::Modulator_ND::bitmap, itpp::LLR_calc_unit::jaclog(), itpp::Modulator_ND::k, and itpp::Modulator_ND::llrcalc.

void itpp::Modulator_ND::update_LLR ( const Array< QLLRvec > &  logP_apriori,
const ivec &  s,
QLLR  scaled_norm,
QLLRvec &  num,
QLLRvec &  denom 
) [protected, inherited]

Update LLR (for internal use).

This function updates the numerator and denominator in the expression

\[ \log \left( \frac {\sum_{s:b_k=0} \exp(-x^2) P(s)} {\sum_{s:b_k=1} \exp(-x^2) P(s)} \right) \]

Parameters:
[in] logP_apriori Vector of a priori probabilities per bit
[in] s Symbol vector
[in] scaled_norm Argument of the exponents in the above equation
[out] num Logarithm of the numerator in the above expression
[out] denom Logarithm of the denominator in the above expression

References itpp::Modulator_ND::bitmap, itpp::LLR_calc_unit::jaclog(), itpp::Modulator_ND::k, itpp::Modulator_ND::llrcalc, and itpp::Modulator_ND::nt.

Referenced by itpp::Modulator_NCD::demodulate_soft_bits(), and itpp::Modulator_NRD::demodulate_soft_bits().

void itpp::Modulator_NRD::update_norm ( double &  norm,
int  k,
int  sold,
int  snew,
const vec &  ytH,
const mat &  HtH,
const ivec &  s 
) [protected, inherited]

Update residual norm (for internal use).

Update the residual norm $|y-Hs|$ when moving from one constellation point to an adjacent point.

Parameters:
[in,out] norm Norm to be updated
[in] k Position where s changed
[in] sold Old value of s[k]
[in] snew New value of s[k]
[in] ytH y'H vector
[in] HtH Grammian matrix H'H
[in] s Symbol vector

References itpp::length(), itpp::sqr(), and itpp::Modulator_NRD::symbols.

Referenced by itpp::Modulator_NRD::demodulate_soft_bits().


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  os,
const Modulator_NRD m 
) [friend, inherited]

Output some properties of the MIMO modulator (mainly to aid debugging).

Print some properties of the MIMO modulator (mainly to aid debugging).


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

Generated on Tue Jun 2 10:02:19 2009 for mixpp by  doxygen 1.5.8