itpp::Modulator_ND Class Reference
Communications Module » Digital Modulation

Base class for an N-dimensional (ND) vector (MIMO) modulator. More...

`#include <itpp/comm/modulator_nd.h>`

Inheritance diagram for itpp::Modulator_ND:

## Public Types

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

## Public Member Functions

| Modulator_ND (LLR_calc_unit llrcalc_in=LLR_calc_unit())
| Default constructor.
virtual | ~Modulator_ND ()
| Destructor.
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 | bits_per_symbol () const
| Get number of bits per modulation symbol per dimension.
ivec | get_M () const
| Get number of modulation symbols per dimension.
Array< ivec > | get_bits2symbols () const
| Get bit pattern in decimal.
Array< bmat > | get_bitmap () const
| Get Bit mapping table.

## Protected Member Functions

QLLRvec | probabilities (QLLR l)
| Convert LLR to log-probabilities.
Array< QLLRvec > | probabilities (const QLLRvec &l)
| Convert LLR to log-probabilities, vector version.
void | marginalize_bits (itpp::QLLRvec &llr, Soft_Demod_Method method) const
| Marginalize (sum) over the bits.
void | demodllrbit0 (itpp::QLLR &llr) const
| Hardcoded implementation of 1:st bit demodulation.
void | demodllrbit1 (itpp::QLLR &llr) const
| Hardcoded implementation of 2:nd bit demodulation.
void | demodllrbit2 (itpp::QLLR &llr) const
| Hardcoded implementation of 3:rd bit demodulation.
void | demodmaxbit0 (itpp::QLLR &maxllr) const
| Hardcoded implementation of 1:st bit demodulation.
void | demodmaxbit1 (itpp::QLLR &maxllr) const
| Hardcoded implementation of 2:nd bit demodulation.
void | demodmaxbit2 (itpp::QLLR &maxllr) const
| Hardcoded implementation of 3:rd bit demodulation.
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

int | nt
| Number of dimensions.
int | nb
| Number of bits in the symbol vector.
LLR_calc_unit | llrcalc
| LLR calculation unit.
ivec | k
| Number of bits per modulation symbol.
ivec | M
| Number of modulation symbols along each dimension.
bool | demod_initialized
| Flag indicating whether the demodulator has been initialized.
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)
double | gaussnorm
| The normalization factor in the exponent (in front of the square norm) in the Gaussian distribution.
itpp::vec | hnorms
| Norms part dependent on H.
itpp::QLLRvec | Qnorms
| Norms part depending on both H and y.
itpp::QLLRvec | llrapr
| A prioi information.
itpp::ivec | bpos2cpos
| The bit to column mapping.
itpp::ivec | bitcumsum
| The cumulative sum of bits in the symbol vector.
itpp::Array< itpp::Vec< unsigned > > | gray2dec
| The Gray to decimal mapping.

## Detailed Description

Base class for an N-dimensional (ND) vector (MIMO) modulator.

See `ND_UPAM` class for examples.

Note
  Can also be used for scalar modulation/demodulation as an alternative to `Modulator_1D` or `Modulator_2D`. Mixed use of `Modulator_1D` or `Modulator_2D` and `Modulator_ND` is not advised.
  For issues relating to the accuracy of LLR computations, please see the documentation of `LLR_calc_unit`

Definition at line 63 of file modulator_nd.h.

## Member Enumeration Documentation

## Soft_Demod_Method

enum itpp::Modulator_ND::Soft_Demod_Method

Soft demodulation method.

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

Definition at line 67 of file modulator_nd.h.

## Constructor & Destructor Documentation

## Modulator_ND()

itpp::Modulator_ND::Modulator_ND | ( | LLR_calc_unit | llrcalc_in = `LLR_calc_unit()` | ) |

inline

Default constructor.

Definition at line 77 of file modulator_nd.h.

## ~Modulator_ND()

virtual itpp::Modulator_ND::~Modulator_ND | ( |  | ) |

inline virtual

Destructor.

Definition at line 80 of file modulator_nd.h.

## Member Function Documentation

## set_llrcalc()

void itpp::Modulator_ND::set_llrcalc | ( | LLR_calc_unit | llrcalc_in | ) |

inline

Set LLR calculation unit.

Definition at line 83 of file modulator_nd.h.

## get_llrcalc()

LLR_calc_unit itpp::Modulator_ND::get_llrcalc | ( |  | ) | const

inline

Get LLR calculation unit.

Definition at line 88 of file modulator_nd.h.

## get_dim()

int itpp::Modulator_ND::get_dim | ( |  | ) | const

inline

Get number of dimensions.

Definition at line 93 of file modulator_nd.h.

## get_k()

ivec itpp::Modulator_ND::get_k | ( |  | ) | const

inline

Get number of bits per modulation symbol per dimension.

Definition at line 98 of file modulator_nd.h.

## bits_per_symbol()

ivec itpp::Modulator_ND::bits_per_symbol | ( |  | ) | const

inline

Get number of bits per modulation symbol per dimension.

Definition at line 103 of file modulator_nd.h.

## get_M()

ivec itpp::Modulator_ND::get_M | ( |  | ) | const

inline

Get number of modulation symbols per dimension.

Definition at line 108 of file modulator_nd.h.

## get_bits2symbols()

Array< ivec > itpp::Modulator_ND::get_bits2symbols | ( |  | ) | const

inline

Get bit pattern in decimal.

Definition at line 113 of file modulator_nd.h.

## get_bitmap()

Array< bmat > itpp::Modulator_ND::get_bitmap | ( |  | ) | const

inline

Get Bit mapping table.

Definition at line 118 of file modulator_nd.h.

## probabilities() [1/2]

QLLRvec itpp::Modulator_ND::probabilities | ( | QLLR | l | ) |

protected

Convert LLR to log-probabilities.

Definition at line 53 of file modulator_nd.cpp.

References itpp::LLR_calc_unit::jaclog(), and llrcalc.

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

## probabilities() [2/2]

Array< QLLRvec > itpp::Modulator_ND::probabilities | ( | const QLLRvec & | l | ) |

protected

Convert LLR to log-probabilities, vector version.

Definition at line 437 of file modulator_nd.cpp.

References itpp::length(), and probabilities().

## marginalize_bits()

void itpp::Modulator_ND::marginalize_bits | ( | itpp::QLLRvec & | llr,
|  | Soft_Demod_Method | method
| ) |  | const

protected

Marginalize (sum) over the bits.

Definition at line 124 of file modulator_nd.cpp.

References demodllrbit0(), demodllrbit1(), demodllrbit2(), demodmaxbit0(), demodmaxbit1(), demodmaxbit2(), FULL_ENUM_LOGMAP, FULL_ENUM_MAXLOG, it_error, itpp::LLR_calc_unit::jaclog(), llrcalc, nb, and Qnorms.

## demodllrbit0()

void itpp::Modulator_ND::demodllrbit0 | ( | itpp::QLLR & | llr | ) | const

protected

Hardcoded implementation of 1:st bit demodulation.

Definition at line 203 of file modulator_nd.cpp.

References itpp::LLR_calc_unit::jaclog(), llrcalc, nb, and Qnorms.

Referenced by marginalize_bits().

## demodllrbit1()

void itpp::Modulator_ND::demodllrbit1 | ( | itpp::QLLR & | llr | ) | const

protected

Hardcoded implementation of 2:nd bit demodulation.

Definition at line 222 of file modulator_nd.cpp.

References itpp::LLR_calc_unit::jaclog(), llrcalc, nb, and Qnorms.

Referenced by marginalize_bits().

## demodllrbit2()

void itpp::Modulator_ND::demodllrbit2 | ( | itpp::QLLR & | llr | ) | const

protected

Hardcoded implementation of 3:rd bit demodulation.

Definition at line 250 of file modulator_nd.cpp.

References itpp::LLR_calc_unit::jaclog(), llrcalc, nb, and Qnorms.

Referenced by marginalize_bits().

## demodmaxbit0()

void itpp::Modulator_ND::demodmaxbit0 | ( | itpp::QLLR & | maxllr | ) | const

protected

Hardcoded implementation of 1:st bit demodulation.

Definition at line 294 of file modulator_nd.cpp.

References nb, and Qnorms.

Referenced by marginalize_bits().

## demodmaxbit1()

void itpp::Modulator_ND::demodmaxbit1 | ( | itpp::QLLR & | maxllr | ) | const

protected

Hardcoded implementation of 2:nd bit demodulation.

Definition at line 320 of file modulator_nd.cpp.

References nb, and Qnorms.

Referenced by marginalize_bits().

## demodmaxbit2()

void itpp::Modulator_ND::demodmaxbit2 | ( | itpp::QLLR & | maxllr | ) | const

protected

Hardcoded implementation of 3:rd bit demodulation.

Definition at line 362 of file modulator_nd.cpp.

References nb, and Qnorms.

Referenced by marginalize_bits().

## update_LLR() [1/2]

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

protected

Update LLR (for internal use)

This function updates the numerator and denominator in the expression

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

Definition at line 94 of file modulator_nd.cpp.

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

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

## update_LLR() [2/2]

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

protected

Update LLR, for scalar channel (for internal use)

This function updates the numerator and denominator in the expression

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

Definition at line 68 of file modulator_nd.cpp.

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

## Member Data Documentation

## nt

int itpp::Modulator_ND::nt

protected

Number of dimensions.

Definition at line 124 of file modulator_nd.h.

Referenced by itpp::Modulator_NCD::demodulate_soft_bits(), itpp::Modulator_NRD::demodulate_soft_bits(), itpp::Modulator_NRD::get_symbols(), itpp::Modulator_NCD::get_symbols(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), itpp::Modulator_NRD::modulate_bits(), itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NRD::modulate_bits(), itpp::ND_UPAM::ND_UPAM(), itpp::ND_UPSK::ND_UPSK(), itpp::ND_UQAM::ND_UQAM(), itpp::ND_UQAM::set_constellation_points(), itpp::ND_UPAM::set_M(), itpp::ND_UQAM::set_M(), itpp::ND_UPSK::set_M(), itpp::ND_UPAM::set_M(), itpp::ND_UQAM::set_M(), itpp::ND_UPSK::set_M(), itpp::ND_UPAM::sphere_decoding(), and update_LLR().

## nb

int itpp::Modulator_ND::nb

protected

Number of bits in the symbol vector.

Definition at line 126 of file modulator_nd.h.

Referenced by demodllrbit0(), demodllrbit1(), demodllrbit2(), demodmaxbit0(), demodmaxbit1(), demodmaxbit2(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), and marginalize_bits().

## llrcalc

LLR_calc_unit itpp::Modulator_ND::llrcalc

protected

LLR calculation unit.

Definition at line 128 of file modulator_nd.h.

Referenced by demodllrbit0(), demodllrbit1(), demodllrbit2(), itpp::Modulator_NCD::demodulate_soft_bits(), itpp::Modulator_NRD::demodulate_soft_bits(), marginalize_bits(), probabilities(), update_LLR(), update_LLR(), and itpp::Modulator_NRD::yxnormupdate().

## k

ivec itpp::Modulator_ND::k

protected

Number of bits per modulation symbol.

Definition at line 130 of file modulator_nd.h.

Referenced by itpp::Modulator_NCD::demodulate_soft_bits(), itpp::Modulator_NCD::demodulate_soft_bits(), itpp::Modulator_NRD::demodulate_soft_bits(), itpp::Modulator_NRD::demodulate_soft_bits(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NRD::modulate_bits(), itpp::ND_UQAM::set_constellation_points(), itpp::ND_UPAM::set_M(), itpp::ND_UQAM::set_M(), itpp::ND_UPSK::set_M(), itpp::ND_UPAM::sphere_decoding(), update_LLR(), and update_LLR().

## M

ivec itpp::Modulator_ND::M

protected

Number of modulation symbols along each dimension.

Definition at line 132 of file modulator_nd.h.

Referenced by itpp::Modulator_NCD::demodulate_soft_bits(), itpp::Modulator_NRD::demodulate_soft_bits(), itpp::Modulator_NRD::get_symbols(), itpp::Modulator_NCD::get_symbols(), itpp::Modulator_NRD::hxnormupdate(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), itpp::ND_UQAM::set_constellation_points(), itpp::ND_UPAM::set_M(), itpp::ND_UQAM::set_M(), itpp::ND_UPSK::set_M(), itpp::ND_UPAM::sphere_decoding(), and itpp::Modulator_NRD::yxnormupdate().

## demod_initialized

bool itpp::Modulator_ND::demod_initialized

protected

Flag indicating whether the demodulator has been initialized.

Definition at line 134 of file modulator_nd.h.

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

## bitmap

Array<bmat> itpp::Modulator_ND::bitmap

protected

Bit mapping table (one table per dimension)

Definition at line 136 of file modulator_nd.h.

Referenced by itpp::ND_UQAM::set_constellation_points(), itpp::ND_UPAM::set_M(), itpp::ND_UQAM::set_M(), itpp::ND_UPSK::set_M(), itpp::ND_UPAM::sphere_decoding(), update_LLR(), and update_LLR().

## bits2symbols

Array<ivec> itpp::Modulator_ND::bits2symbols

protected

Bit pattern in decimal form ordered and the corresponding symbols (one pattern per dimension)

Definition at line 138 of file modulator_nd.h.

Referenced by itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NRD::modulate_bits(), itpp::ND_UQAM::set_constellation_points(), itpp::ND_UPAM::set_M(), itpp::ND_UQAM::set_M(), and itpp::ND_UPSK::set_M().

## gaussnorm

double itpp::Modulator_ND::gaussnorm

protected

The normalization factor in the exponent (in front of the square norm) in the Gaussian distribution.

Definition at line 140 of file modulator_nd.h.

Referenced by itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), and itpp::Modulator_NRD::yxnormupdate().

## hnorms

itpp::vec itpp::Modulator_ND::hnorms

protected

Norms part dependent on H.

Definition at line 142 of file modulator_nd.h.

Referenced by itpp::Modulator_NRD::hxnormupdate(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), and itpp::Modulator_NRD::yxnormupdate().

## Qnorms

itpp::QLLRvec itpp::Modulator_ND::Qnorms

protected

Norms part depending on both H and y.

Definition at line 144 of file modulator_nd.h.

Referenced by demodllrbit0(), demodllrbit1(), demodllrbit2(), demodmaxbit0(), demodmaxbit1(), demodmaxbit2(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), marginalize_bits(), and itpp::Modulator_NRD::yxnormupdate().

## llrapr

itpp::QLLRvec itpp::Modulator_ND::llrapr

protected

A prioi information.

Definition at line 146 of file modulator_nd.h.

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

## bpos2cpos

itpp::ivec itpp::Modulator_ND::bpos2cpos

protected

The bit to column mapping.

Definition at line 148 of file modulator_nd.h.

Referenced by itpp::Modulator_NRD::hxnormupdate(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), and itpp::Modulator_NRD::yxnormupdate().

## bitcumsum

itpp::ivec itpp::Modulator_ND::bitcumsum

protected

The cumulative sum of bits in the symbol vector.

Definition at line 150 of file modulator_nd.h.

Referenced by itpp::Modulator_NRD::hxnormupdate(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), and itpp::Modulator_NRD::yxnormupdate().

## gray2dec

itpp::Array<itpp::Vec<unsigned> > itpp::Modulator_ND::gray2dec

protected

The Gray to decimal mapping.

Definition at line 152 of file modulator_nd.h.

Referenced by itpp::Modulator_NRD::hxnormupdate(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), and itpp::Modulator_NRD::yxnormupdate().

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

- itpp/comm/modulator_nd.h
- itpp/comm/modulator_nd.cpp

Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8