#include <modulator_nd.h>
Public Types | |
| enum | Soft_Demod_Method { FULL_ENUM_LOGMAP, ZF_LOGMAP } |
| Soft demodulation method. More... | |
Public Member Functions | |
| ND_UQAM (int nt=1, int Mary=4) | |
| Constructor. | |
| ~ND_UQAM () | |
| Destructor. | |
| void | set_M (int nt=1, int Mary=4) |
| Set component modulators to M-QAM with Gray mapping. | |
| void | set_M (int nt=1, ivec Mary="4") |
| Set component modulators to M-QAM with Gray mapping, different M per component. | |
| Array< cvec > | get_symbols () const |
| Get modulation symbols per dimension. | |
| void | modulate_bits (const bvec &bits, cvec &symbols) const |
Modulate bits into symbols. | |
| cvec | modulate_bits (const bvec &bits) const |
| Modulation of bits. | |
| void | demodulate_soft_bits (const cvec &y, const cmat &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 cvec &y, const cmat &H, double sigma2, const QLLRvec &LLR_apriori, Soft_Demod_Method method) |
| Soft demodulation wrapper function for various methods. | |
| void | demodulate_soft_bits (const cvec &y, const cmat &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 cvec &y, const cvec &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 cvec &ytH, const cmat &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 | |
| ivec | L |
| the square root of M | |
| Array< cvec > | 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< bmat > | bitmap |
| 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_NCD &m) |
| Print some properties of the MIMO modulator (mainly to aid debugging). | |
enum itpp::Modulator_ND::Soft_Demod_Method [inherited] |
| void itpp::Modulator_NCD::demodulate_soft_bits | ( | const cvec & | y, | |
| const cvec & | 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
. 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_NCD::symbols, itpp::LLR_calc_unit::to_qllr(), and itpp::Modulator_ND::update_LLR().
| void itpp::Modulator_NCD::demodulate_soft_bits | ( | const cvec & | y, | |
| const cmat & | 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
without approximations. It is assumed that H, y and s are complex-valued.
| [in] | y | Received vector |
| [in] | H | Channel matrix |
| [in] | sigma2 | Noise variance per complex dimension, i.e. the sum of real and imaginary parts (typically ) |
| [in] | LLR_apriori | Vector of a priori LLR values per bit |
| [out] | LLR_aposteriori | Vector of a posteriori LLR values |
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 itpp::conj(), 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_NCD::symbols, itpp::LLR_calc_unit::to_qllr(), itpp::Modulator_ND::update_LLR(), and itpp::Modulator_NCD::update_norm().
| QLLRvec itpp::Modulator_NCD::demodulate_soft_bits | ( | const cvec & | y, | |
| const cmat & | 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:
| [in] | y | Received vector |
| [in] | H | Channel matrix |
| [in] | sigma2 | Noise variance per complex dimension, i.e. the sum of real and imaginary parts (typically ) |
| [in] | LLR_apriori | Vector of a priori LLR values per bit |
| [in] | method | Soft demodulation method |
References itpp::Modulator_NCD::demodulate_soft_bits().
| void itpp::Modulator_NCD::demodulate_soft_bits | ( | const cvec & | y, | |
| const cmat & | H, | |||
| double | sigma2, | |||
| const QLLRvec & | LLR_apriori, | |||
| QLLRvec & | LLR_aposteriori, | |||
| Soft_Demod_Method | method | |||
| ) | [inherited] |
Soft demodulation wrapper function for various methods.
Soft demodulation wrapper function for various methods Currently the following two demodulation methods are supported:
| [in] | y | Received vector |
| [in] | H | Channel matrix |
| [in] | sigma2 | Noise variance per complex dimension, i.e. the sum of real and imaginary parts (typically ) |
| [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_c(), itpp::real(), itpp::sqrt(), itpp::sum(), itpp::zeros_i(), and itpp::Modulator_ND::ZF_LOGMAP.
Referenced by itpp::Modulator_NCD::demodulate_soft_bits().
| 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
| [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
| [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_NCD::update_norm | ( | double & | norm, | |
| int | k, | |||
| int | sold, | |||
| int | snew, | |||
| const cvec & | ytH, | |||
| const cmat & | HtH, | |||
| const ivec & | s | |||
| ) | [protected, inherited] |
Update residual norm (for internal use).
Update the residual norm
when moving from one constellation point to an adjacent point.
| [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::conj(), itpp::length(), itpp::real(), itpp::sqr(), and itpp::Modulator_NCD::symbols.
Referenced by itpp::Modulator_NCD::demodulate_soft_bits().
1.5.8