#include <itpp/comm/modulator_nd.h>
Inheritance diagram for itpp::ND_UPAM:
Public Member Functions | |
ND_UPAM (int nt_in=1, int Mary=2) | |
Constructor. | |
~ND_UPAM () | |
Destructor. | |
void | set_Gray_PAM (int nt_in=1, int Mary=2) |
Set component modulators to M-PAM with Gray mapping. | |
void | set_Gray_PAM (int nt_in=1, ivec Mary="2") |
Set component modulators to M-PAM with Gray mapping, different M per component. | |
int | sphere_decoding (vec &y, mat &H, double rmin, double rmax, double stepup, QLLRvec &detected_bits) |
Sphere decoding. | |
void | ZF_demod (QLLRvec &detected_bits, double sigma2, mat &H, vec &y) |
ZF demodulation (NOT IMPLEMENTED YET). | |
void | MMSE_demod (QLLRvec &detected_bits, double sigma2, mat &H, vec &y) |
MMSE demodulation (NOT IMPLEMENTED YET). | |
Vec< vec > | get_symbols () |
Get modulation symbols per dimension. | |
vec | modulate_bits (const bvec &bits) const |
Modulation of bits. | |
void | map_demod (QLLRvec &LLR_apriori, QLLRvec &LLR_aposteriori, double sigma2, mat &H, vec &y) |
Soft MAP demodulation for multidimensional channel, by "brute-force" enumeration of all constellation points. | |
void | map_demod (QLLRvec &LLR_apriori, QLLRvec &LLR_aposteriori, double sigma2, vec &h, vec &y) |
Soft MAP demodulation for parallel channels without crosstalk. | |
int | get_dim () |
Get number of dimensions. | |
LLR_calc_unit | get_llrcalc () const |
Get LLR calculation unit. | |
ivec | get_k () |
Get number of bits per modulation symbol. | |
ivec | get_M () |
Get number of modulation symbols per dimension. | |
Protected Member Functions | |
void | update_norm (double &norm, int k, int sold, int snew, vec &ytH, mat &HtH, ivec &s) |
For internal use only. | |
QLLRvec | probabilities (QLLR l) |
Convert LLR to log-probabilities. | |
Vec< QLLRvec > | probabilities (QLLRvec &l) |
Convert LLR to log-probabilities, vector version. | |
void | update_LLR (Vec< QLLRvec > &logP_apriori, QLLRvec &numerator, QLLRvec &denominator, ivec &s, QLLR x) |
Update LLR (for internal use). | |
void | update_LLR (Vec< QLLRvec > &logP_apriori, QLLRvec &numerator, QLLRvec &denominator, int s, QLLR scaled_norm, int j) |
Update LLR, for scalar channel (for internal use). | |
Protected Attributes | |
Vec< vec > | symbols |
Vector 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. | |
Vec< bmat > | bitmap |
Bit mapping table (one table per dimension). | |
Vec< 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 &mod) |
Print some properties of the MIMO modulator in plain text (mainly to aid debugging). |
Example: (4*3 matrix channel with 4-PAM)
ND_UPAM chan; // Multidimensional channel with uniform PAM chan.set_Gray_PAM(3,4); // 3-dimensional matrix channel, 4-PAM (2 bits) per dimension cout << chan << endl; bvec b=randb(3*2); // 3*2 bits in total vec x=chan.modulate_bits(b); QLLRvec llr = zeros_i(3*2); QLLRvec llr_ap = zeros_i(3*2); // apriori equiprobable bits mat H = randn(4,3); // 4*3 matrix channel double sigma2=0.01; // noise variance vec y= H*x + sqrt(sigma2)*randn(4); // add noise chan.map_demod(llr_ap, llr, sigma2, H, y); 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_Gray_PAM(1,8); // scalar channel, 8-PAM (3 bits) cout << chan << endl; bvec b=randb(3); vec x=chan.modulate_bits(b); QLLRvec llr = zeros_i(3); QLLRvec llr_ap = zeros_i(3); mat H = "1.0"; // scalar channel double sigma2=0.01; vec y= H*x + sqrt(sigma2)*randn(1); // add noise chan.map_demod(llr_ap, llr, sigma2, H, y); cout << "True bits:" << b << endl; cout << "LLRs:" << chan.get_llrcalc().to_double(llr) << endl;
Definition at line 336 of file modulator_nd.h.
|
Constructor.
Definition at line 405 of file modulator_nd.cpp. References set_Gray_PAM(). |
|
Destructor.
Definition at line 341 of file modulator_nd.h. |
|
Set component modulators to M-PAM with Gray mapping.
Definition at line 411 of file modulator_nd.cpp. Referenced by ND_UPAM(). |
|
Set component modulators to M-PAM with Gray mapping, different M per component.
Definition at line 421 of file modulator_nd.cpp. References itpp::bin2dec(), itpp::Modulator_ND::bitmap, itpp::Modulator_ND::bits2symbols, itpp::graycode(), it_assert, itpp::Modulator_ND::k, itpp::length(), itpp::log2(), itpp::Modulator_ND::M, itpp::round_i(), itpp::Vec< Num_T >::set_size(), itpp::sqrt(), and itpp::Modulator_NRD::symbols. |
|
Sphere decoding. This function solves the integer-constrained minimization problem
with respect to
Definition at line 552 of file modulator_nd.cpp. References itpp::Mat< Num_T >::cols(), itpp::Mat< Num_T >::get_col(), it_assert, itpp::length(), itpp::Modulator_ND::M, and itpp::Mat< Num_T >::rows(). |
|
ZF demodulation (NOT IMPLEMENTED YET).
|
|
MMSE demodulation (NOT IMPLEMENTED YET).
|
|
Get modulation symbols per dimension.
Definition at line 154 of file modulator_nd.h. References itpp::Modulator_NRD::symbols. |
|
Modulation of bits. Returns a vector of modulated symbols.
Definition at line 338 of file modulator_nd.cpp. References itpp::bin2dec(), itpp::Modulator_ND::bits2symbols, it_assert, itpp::Modulator_ND::k, itpp::length(), itpp::sum(), and itpp::Modulator_NRD::symbols. |
|
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 real-valued. Complex-valued channels can be handled via the
Definition at line 192 of file modulator_nd.cpp. References itpp::Mat< Num_T >::cols(), it_assert, itpp::Modulator_ND::k, itpp::length(), itpp::Modulator_ND::M, itpp::Mat< Num_T >::rows(), and itpp::sum(). |
|
Soft MAP demodulation for parallel channels without crosstalk.
This function is equivalent to Definition at line 138 of file modulator_nd.cpp. References it_assert, itpp::Modulator_ND::k, itpp::length(), itpp::Modulator_ND::llrcalc, itpp::Modulator_ND::M, itpp::ones_i(), itpp::Modulator_ND::probabilities(), QLLR_MAX, itpp::sqr(), itpp::sum(), itpp::Modulator_NRD::symbols, itpp::LLR_calc_unit::to_qllr(), and itpp::Modulator_ND::update_LLR(). |
|
For internal use only.
Update the residual norm
Definition at line 111 of file modulator_nd.cpp. References itpp::length(), itpp::sqr(), and itpp::Modulator_NRD::symbols. |
|
Get number of dimensions.
Definition at line 57 of file modulator_nd.h. References itpp::Modulator_ND::nt. |
|
Get LLR calculation unit.
Definition at line 60 of file modulator_nd.h. References itpp::Modulator_ND::llrcalc. |
|
Get number of bits per modulation symbol.
Definition at line 63 of file modulator_nd.h. References itpp::Modulator_ND::k. |
|
Get number of modulation symbols per dimension.
Definition at line 66 of file modulator_nd.h. References itpp::Modulator_ND::M. |
|
Convert LLR to log-probabilities.
Definition at line 44 of file modulator_nd.cpp. References itpp::LLR_calc_unit::jaclog(), and itpp::Modulator_ND::llrcalc. Referenced by itpp::Modulator_NCD::map_demod(), itpp::Modulator_NRD::map_demod(), and itpp::Modulator_ND::probabilities(). |
|
Convert LLR to log-probabilities, vector version.
Definition at line 58 of file modulator_nd.cpp. References itpp::length(), and itpp::Modulator_ND::probabilities(). |
|
Update LLR (for internal use). This function updates the numerator and denominator in the expression
Definition at line 87 of file modulator_nd.cpp. References itpp::Modulator_ND::bitmap, itpp::Modulator_ND::k, and itpp::Modulator_ND::nt. Referenced by itpp::Modulator_NCD::map_demod(), and itpp::Modulator_NRD::map_demod(). |
|
Update LLR, for scalar channel (for internal use). This function updates the numerator and denominator in the expression
Definition at line 67 of file modulator_nd.cpp. References itpp::Modulator_ND::bitmap, and itpp::Modulator_ND::k. |
|
Print some properties of the MIMO modulator in plain text (mainly to aid debugging).
Definition at line 374 of file modulator_nd.cpp. |
|
Vector of modulation symbols (along each dimension).
Definition at line 206 of file modulator_nd.h. Referenced by itpp::Modulator_NRD::get_symbols(), itpp::Modulator_NRD::map_demod(), itpp::Modulator_NRD::modulate_bits(), set_Gray_PAM(), and itpp::Modulator_NRD::update_norm(). |
|
Number of dimensions.
Definition at line 70 of file modulator_nd.h. Referenced by itpp::Modulator_ND::get_dim(), and itpp::Modulator_ND::update_LLR(). |
|
LLR calculation unit.
Definition at line 72 of file modulator_nd.h. Referenced by itpp::Modulator_ND::get_llrcalc(), itpp::Modulator_NCD::map_demod(), itpp::Modulator_NRD::map_demod(), itpp::Modulator_ND::Modulator_ND(), and itpp::Modulator_ND::probabilities(). |
|
Number of bits per modulation symbol.
Definition at line 74 of file modulator_nd.h. Referenced by itpp::Modulator_ND::get_k(), itpp::Modulator_NCD::map_demod(), itpp::Modulator_NRD::map_demod(), itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NRD::modulate_bits(), set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), itpp::ND_UQAM::set_Gray_QAM(), and itpp::Modulator_ND::update_LLR(). |
|
Number of modulation symbols along each dimension.
Definition at line 76 of file modulator_nd.h. Referenced by itpp::Modulator_ND::get_M(), itpp::Modulator_NCD::map_demod(), itpp::Modulator_NRD::map_demod(), set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), itpp::ND_UQAM::set_Gray_QAM(), and sphere_decoding(). |
|
Bit mapping table (one table per dimension).
Definition at line 78 of file modulator_nd.h. Referenced by set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), itpp::ND_UQAM::set_Gray_QAM(), and itpp::Modulator_ND::update_LLR(). |
|
Bit pattern in decimal form ordered and the corresponding symbols (one pattern per dimension).
Definition at line 80 of file modulator_nd.h. Referenced by itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NRD::modulate_bits(), set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), and itpp::ND_UQAM::set_Gray_QAM(). |
Generated on Thu Apr 19 14:20:03 2007 for IT++ by Doxygen 1.4.6